Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Trigger order at exact SMA & price crossing

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

    Trigger order at exact SMA & price crossing

    Hello,

    I am trying to automate a very simple strategy with NinjaTrader 8 strategy builder. The idea is the following: I want to use one (and only one) moving average; and I want a long position to be open every time the price goes above this moving average, and to be closed when price crosses below this moving average. Similarly, I want a short position to be open when the price goes below this SMA, and to be closed when price crosses above the SMA. This strategy is very simple but I am struggling to implement one specific parameter: I want the positions to be open at the exact moment when price crosses the SMA, and not after the candle close, the low, the high or anything else. This is very important.
    So for instance for the short position, this is how I have set my condition :



    I assume that if I want to short when the price crosses below the SMA I have to select : "if SMA crosses above bid", as I have done, right?

    But after that, below the price section on the picture, where I have put a "2", I still have to enter the parameters of the bid isn't it? Where it is written "Misc. Series 1". And when I open this section, I have the following choices (screenshot below), so it seems to me that I cannot simply choose "bid". What did I get wrong, and how could I implement my strategy, please? Am I right to select "bid" if I want the bot to short at the exact moment when the price crosses below the SMA? Should I do otherwise?



    Thank you very much for your help,
    Best regards,
    Patrick.

    #2
    Hello Patrick83400,

    Welcome to the NinjaTrader forums!

    We have received this exact question from a private email sent to platformsupport [at] ninjatrader [dot] com.

    Are you wanting to move the conversation from private email to a public conversation on this forum? (If so, I will stop replying via email and start replying here)
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by bortz, 11-06-2023, 08:04 AM
    47 responses
    1,604 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    8 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    18 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    4 views
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    13 views
    0 likes
    Last Post Javierw.ok  
    Working...
    X