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 WHICKED, 06-27-2023, 12:07 PM
    66 responses
    768 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by tkaboris, 06-11-2024, 08:06 AM
    11 responses
    32 views
    0 likes
    Last Post tkaboris  
    Started by Matt Skinner, Yesterday, 12:23 AM
    3 responses
    29 views
    0 likes
    Last Post Matt Skinner  
    Started by Dan_TUK, Today, 05:14 AM
    0 responses
    7 views
    0 likes
    Last Post Dan_TUK
    by Dan_TUK
     
    Started by wzgy0920, 04-20-2024, 06:09 PM
    7 responses
    59 views
    0 likes
    Last Post Joia_
    by Joia_
     
    Working...
    X