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 Barry Milan, Yesterday, 10:35 PM
      5 responses
      16 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by DanielSanMartin, Yesterday, 02:37 PM
      2 responses
      13 views
      0 likes
      Last Post DanielSanMartin  
      Started by DJ888, 04-16-2024, 06:09 PM
      4 responses
      12 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by terofs, Today, 04:18 PM
      0 responses
      11 views
      0 likes
      Last Post terofs
      by terofs
       
      Started by nandhumca, Today, 03:41 PM
      0 responses
      8 views
      0 likes
      Last Post nandhumca  
      Working...
      X