Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

connected charts

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

    connected charts

    Hi,

    i am building a strategy on the 5 minue chart but i want it tolook at an indicator on the 20 minute chart, does anyone have advice on how best to do this?

    Thanks

    #2
    Hello,
    You can achieve this by adding in a secondary data series that is a 20 minute data series and then calculate your indicator within your strategy using BarsArray.
    I have provided an example of how you could do this below:

    Code:
    protected override void Initialize()
    {
    	Add(PeriodType.Minute, 5);
    
    }
    protected override void OnBarUpdate()
    {
    `			if(EMA(BarsArray[1], 20)[0] > Close[0])//Checks if the EMA of the 20 minute series is greater than the close of the primary series
    		//DoSomething
    }
    I would recommend reviewing the following sections of our help guide:

    If we can be of any other assistance please let us know.
    Cody B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cls71, Today, 04:45 AM
    0 responses
    1 view
    0 likes
    Last Post cls71
    by cls71
     
    Started by mjairg, 07-20-2023, 11:57 PM
    3 responses
    213 views
    1 like
    Last Post PaulMohn  
    Started by TheWhiteDragon, 01-21-2019, 12:44 PM
    4 responses
    544 views
    0 likes
    Last Post PaulMohn  
    Started by GLFX005, Today, 03:23 AM
    0 responses
    3 views
    0 likes
    Last Post GLFX005
    by GLFX005
     
    Started by XXtrader, Yesterday, 11:30 PM
    2 responses
    12 views
    0 likes
    Last Post XXtrader  
    Working...
    X