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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      47 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      23 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      33 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X