• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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).

        https://ninjatrader.com/support/help...rlonglimit.htm

        (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 dieci, Today, 03:31 PM
        0 responses
        1 view
        0 likes
        Last Post dieci
        by dieci
         
        Started by StevenNelson, Today, 03:05 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Heath  
        Started by Benjaminf, Today, 02:21 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by grayfrog, 05-24-2020, 09:29 PM
        5 responses
        32 views
        0 likes
        Last Post NinjaTrader_RyanS  
        Started by chrismcdermut, Today, 01:46 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Kate  
        Working...
        X