Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

manual stop

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    manual stop

    Click image for larger version

Name:	fsdafadsfasdfasgdgagageffaefaefeafafa.png
Views:	199
Size:	31.0 KB
ID:	1212719

    Will something like this work?
    That if profit from 1 bar ago was greater than $20 and I'm going negative $0 just manually stop out?
    I'm considering something like this because my experience with the ATM is that it doesnt even enable itself.
    My experience with trailing stops has been its too complicated to work.
    My experience in doing what I'm trying to do manually here has been.. its very very unreliable. You dont know if it'll stop out. thanks

    #2
    Hello ezrollin,

    Thanks for your post.

    I would not be able to determine if your strategy would work based on the screenshot you shared.

    Ultimately, you would have to thoroughly test and debug your strategy to determine if the strategy works as you expect it to.

    Below is a link to a forum post that demonstrates how to use prints to understand behavior.
    https://ninjatrader.com/support/foru...121#post791121

    Note that NinjaScript strategies are intended to run without any manual intervention. NinjaScript strategies cannot see manually placed orders and if you manually place orders then your Strategy Position and Account position will be out of sync.

    See this help guide page for information about Strategy Position vs Account Position: https://ninjatrader.com/support/help..._account_p.htm

    If you would like to place a stop loss, profit target, or trailing stop order, you could consider using the Stops and Targets screen of the Strategy Builder.

    Stops and Targets screen: https://ninjatrader.com/support/help...dTargetsScreen

    Or, you could use Exit methods, such as ExitLongLimit() and ExitLongStopLimit(), to place stop loss and profit target orders. You could see the example scripts in the forum thread linked below for an example of Strategy Builder breakeven and Strategy Builder trailing stop.

    https://ninjatrader.com/support/foru...der#post806596

    Let me know if I may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Click image for larger version

Name:	sadfasdfasfeaceavaeaaadfadsfdas.png
Views:	130
Size:	29.8 KB
ID:	1219405

      I think this is what I meant to show you.
      I'm trying to make an auto break even or a way to protect profits when I'm up a certain amount, I just want to make sure I cant go negative.
      You recommended me to use ExitLongStopLimit() but it never works for me.

      Why does my Condition/Action never work when I do something like this? thanks

      Comment


        #4
        ExitLongStopMarket() is shown in my picture

        Comment


          #5
          Hello ezrollin,

          The order would be automatically cancelled if it is not submitted on each new bar.

          Enable TraceOrders and add prints to understand what is happening with your script.


          Below is a link to an example of a breakeven and trailing logic with exit orders in the Strategy Builder.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            with the way this condition is written in the screenshot, isnt it already set up to be submitted each new bar/price change/tick?

            Comment


              #7
              Hello ezrollin,

              Thanks for your note.

              The order in the screenshot you shared in post # 3 would submit the Exit order when the conditions you set become true.

              If the expected trade(s) are not appearing, this would indicate that the condition to place the order is not evaluating as true or the order is being ignored for other reasons.

              To understand why the script is behaving as it is, such as placing orders or not placing orders when expected, it is necessary to add prints to the script that print the values used for the logic of the script to understand how the script is evaluating.

              In the strategy add prints (outside of any conditions) that print the values of every variable used in every condition that places an order along with the time of that bar. Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).

              Also, enable TraceOrders which will let us know if any orders are being ignored and not being submitted when the condition to place the orders is evaluating as true.

              Below is a link to a forum post that demonstrates how to use prints to understand behavior.

              https://ninjatrader.com/support/foru...121#post791121

              Let me know if I may assist further.​
              <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by johnMoss, Yesterday, 08:56 PM
              2 responses
              20 views
              0 likes
              Last Post johnMoss  
              Started by michelz, Yesterday, 08:30 AM
              5 responses
              44 views
              0 likes
              Last Post MiCe1999  
              Started by ntbone, Yesterday, 01:50 AM
              13 responses
              56 views
              0 likes
              Last Post MiCe1999  
              Started by gyilaoliver, Today, 10:30 AM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by Irukandji, Yesterday, 04:24 PM
              2 responses
              27 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Working...
              X