Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Maximum Pull back distance and Favored moves

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

    Maximum Pull back distance and Favored moves


    Hello and happy holidays

    I am testing a strategy and I would like to measure the distance of pull backs and favored moves. The the above chart is showing, the green bar is my signal bar and I buy the close of this bar. The market pulled back against the entry for 3pts and then went in favor for 3.75pts, is there a built-in function that tracks this automatically as long as my target/stop loss is not hit? If not, I might need to code it from scratch.

    Thank you.​

    #2
    Hello dwrety,

    Thanks for your post.

    The image you shared seems to be a broken link so I cannot see what you are referring to in the image.

    That said, this would require adding custom logic to your script to calculate those specific values.

    You could consider saving the close price of that bar to a double variable when you enter the position and then compare if the current bar's close price (Close[0]) is a certain distance from that variable.

    Please let us know if we may further assist.

    <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
      Originally posted by NinjaTrader_BrandonH View Post
      Hello dwrety,

      Thanks for your post.

      The image you shared seems to be a broken link so I cannot see what you are referring to in the image.

      That said, this would require adding custom logic to your script to calculate those specific values.

      You could consider saving the close price of that bar to a double variable when you enter the position and then compare if the current bar's close price (Close[0]) is a certain distance from that variable.

      Please let us know if we may further assist.
      Thanks for your reply. I did exactly as you suggested. I also want to keep track of the maximum pull back distance and maximum favorable distance, so I saved them as 2 variables.

      Let me give a real example. Hopefully this time you can see the chart.
      Click image for larger version

Name:	image.png
Views:	84
Size:	12.5 KB
ID:	1283685
      The blue bars are signals and I enter at the close of bar 34. The next bar has no pull back effect on the close of bar 34, and the pull back distance is 0 tick. And the maximum run is from the entry to the close. However, since I calculate this strategy "on bar close", so the pull back effect and run effect will always be 1 bar before the position is actually closed. Is there a way that I can get around it?

      And I need the signal bar to be closed to generate the signals, so I cannot simply just turn the script into "on each tick". ​
      Last edited by dwrety; 12-26-2023, 10:17 AM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      54 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      131 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      73 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X