Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Buy 8 ticks below/above signal

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

    Buy 8 ticks below/above signal

    Hello,

    What line of code I have to add to tell my strategy to EnterLong 10 ticks below this signal?

    if( (macd.Avg[0] < 0) // signal line below zero
    && ((macd[0] > upperBand[0]) && (macd[1] <= upperBand[1]))) // cross up
    {
    EnterLong("MACDBB_LongEntry");

    As it is, my strategy is entering at Market at the opening of the next bar.

    Thanks

    Alan

    #2
    Hello Alan,

    Orders appear on the open of the next bar when Calculate is 'On bar close'.
    https://ninjatrader.com/support/foru...992#post782992

    Are you wanting to use a Market Order?

    Likely you will need two conditions. The first condition checks the proposed criteria and sets a value to a variable as a trigger such as the price. Then a second condition checks this variable and when set will wait until the Close[0] drops the desired amount of ticks below the saved price. When this occurs the second condition will reset the variable and submit the order.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      No, I actually want to buy with LIMIT (not market) order 10 ticks below the signal.

      Comment


        #4
        Hello futuros,

        Then use EnterLongLimit(Close[0] - 8 * TickSize).



        (Optionally, use the overload with isLiveUntilCancelled as true to keep the order alive on new bars without having to resubmit)
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        33 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        124 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        64 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        41 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        46 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X