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

Open position based on signals from two time frames

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

    Open position based on signals from two time frames

    Hello!

    I want to make a strategy using two different timeframes:
    1. On larger timeframe I decide the direction of position(long/short)
    2. Based on signal from smaller time frame I open position

    For example, suppose I choose time frames 15min and 60min, on both timeframes I use some indicator.
    I want to detect the following case:
    1. On 60 min time frame signal from indicator is fired.
    2. Wait signal from the indicator from second time frame and open position if it is received

    Example:
    1. Suppose, bar for 10:00-11:00 is closed.
    2. On the 11:05 I know that condition for bar 11:00-12:00 is fulfilled(i.e. signal from 60min time frame is received)
    3. In 11:30 I receive signal from 15min time frame and open position

    Please, give me a piece of advice, how to implement this strategy.

    #2
    Hello,

    You can accomplish this by adding a secondary data series in your script. We have a reference sample available that will show you how to accomplish this in your code:

    http://www.ninjatrader.com/support/f...ead.php?t=5787

    Please let me know if I can assist further.
    Dave I.NinjaTrader Product Management

    Comment


      #3
      Originally posted by NinjaTrader_Dave View Post
      Hello,

      You can accomplish this by adding a secondary data series in your script. We have a reference sample available that will show you how to accomplish this in your code:



      Please let me know if I can assist further.
      Hello!

      Thank you! It was helpful, but I took a look at other samples and, I think, the sample SampleIntrabarBacktest is more relevant.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by ScottWalsh, Today, 06:52 PM
      0 responses
      2 views
      0 likes
      Last Post ScottWalsh  
      Started by ftsc2022, 10-25-2022, 12:03 PM
      5 responses
      255 views
      0 likes
      Last Post KeyonMatthews  
      Started by ScottW, Today, 06:09 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Board game geek, 10-29-2023, 12:00 PM
      14 responses
      244 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by Waxavi, 04-19-2024, 02:10 AM
      4 responses
      56 views
      0 likes
      Last Post sonia0101  
      Working...
      X