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

Strategy dont execute trade

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

    Strategy dont execute trade

    Hello, I got my strategy signal and I want to go short when price is above this line

    My settings are on bar close

    I know this is the issue but how can I setup: when price is above this line (not only close) then .... execute trade


    Thank you
    Attached Files

    #2
    Hello Uregon,

    Thank you for your post.

    To have your code react to an immediate cross of a line and place an immediate order, your code would need to run using Calculate.OnPriceChange or Calculate.OnEachTick.



    With these calculation modes, Close[0] is the price of the currently forming bar.

    Please note that in these calculation modes it is entirely possible that the price may cross and uncross many times within the bar because of the price movement. As a result, your code may issue entry orders many times so you will need to add further logic to prevent multiple orders.

    If you have further questions please let us know.
    Gaby V.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by psangram, 07-22-2024, 08:14 PM
    2 responses
    14 views
    0 likes
    Last Post psangram  
    Started by tomturn, 06-12-2024, 09:00 PM
    2 responses
    113 views
    0 likes
    Last Post Triple_M  
    Started by psangram, Today, 03:14 AM
    0 responses
    4 views
    0 likes
    Last Post psangram  
    Started by giogio1, Today, 02:56 AM
    0 responses
    5 views
    0 likes
    Last Post giogio1
    by giogio1
     
    Started by Skifree, Today, 02:42 AM
    0 responses
    5 views
    0 likes
    Last Post Skifree
    by Skifree
     
    Working...
    X