Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using size of entry trigger candle in ticks as a profit target in strategy builder

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

    Using size of entry trigger candle in ticks as a profit target in strategy builder

    Example: A long order fires and the close of that firing bar, minus its entry point, in ticks, is used to set the target tick value. In doing so, the entry fires as expected and then immediately exits 1 tick up. Currently Have:

    From Entry Signal @ "Long"
    Mode Ticks
    Value (Default input(0) - (Open(0))

    Have tried other setups, plus 1 bar back etc., playing with the math functions & keep getting 1 tick exits.

    Thoughts?
    Thanx

    JM

    #2
    Hello JM,

    Thanks for your post.

    To clarify, when the order is placed by the strategy you are wanting to calculate the Close price minus the Open price, convert that value to ticks, and pass that value into your profit target offset. Is that correct?

    Close[0] - Open[0] would return a price, not a number of ticks. It is not possible to convert the price to ticks in the Strategy Builder. The Strategy Builder is limited to doing very simple mathmatics and there is not method or function available for converting price to ticks in NinjaScript. Converting price to ticks would require unlocking the code from the Strategy Builder and manually coding your own custom logic to calculate that value.
    <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
      Yeah that's what I thought. Code yes, SB no...

      Thank You !

      JM

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      62 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      134 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      75 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      45 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      50 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X