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 in two Charts with same instrument

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

    Strategy in two Charts with same instrument

    Hello!
    I need help!

    I have programmed a strategy for NT8. I want to run this strategy with the same instrument (MNQ) in different charts (15min, 1h) at the same time.

    Example: The strategy sets an order based on a signal in the 15 minutes chart. Then no further order should be opened in either the 15 minute chart or the 1h chart, even if signals arise. Only when this original order has been closed should further signals in either the 15-minute or 1h chart be monitored and orders be placed. What do I set? Wait until flat? Synchronize?
    Please help me!
    Thank you!

    #2
    Hello MatthiasBern,

    Welcome to the NinjaTrader forums!

    You have mentioned that you are using NinjaTrader 8, however you have posted in the NinjaTrader 7 section of the forums. I am moving your post to the NinjaTrader 8 section of the forums.

    Running two scripts on the same instrument and account will result in 1 or more of the strategies not being in sync with the account.

    Below is a link to a forum post that details.
    https://ninjatrader.com/support/foru...660#post792660

    NinjaScripts do not communicate with each other, however you can at least check the PositionAccount to see if the account has a position (from any script or manually opened) in the strategy logic to prevent new orders from being submitted.
    https://ninjatrader.com/support/help...etposition.htm


    That said, its not very clear why you would be running two instances of the same strategy on the same instrument, unless you specifically wanted to trade two different accounts.

    I would recommend instead, that you add all of the time frames to one strategy instance with AddDataSeries(), and perform logic for any time frame added.
    https://ninjatrader.com/support/help...dataseries.htm
    Last edited by NinjaTrader_ChelseaB; 10-20-2022, 12:55 PM.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by fx.practic, 10-15-2013, 12:53 AM
    5 responses
    5,406 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by Shai Samuel, 07-02-2022, 02:46 PM
    4 responses
    98 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by DJ888, Yesterday, 10:57 PM
    0 responses
    8 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by MacDad, 02-25-2024, 11:48 PM
    7 responses
    160 views
    0 likes
    Last Post loganjarosz123  
    Started by Belfortbucks, Yesterday, 09:29 PM
    0 responses
    9 views
    0 likes
    Last Post Belfortbucks  
    Working...
    X