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 GLFX005, Today, 03:23 AM
    0 responses
    1 view
    0 likes
    Last Post GLFX005
    by GLFX005
     
    Started by XXtrader, Yesterday, 11:30 PM
    2 responses
    11 views
    0 likes
    Last Post XXtrader  
    Started by Waxavi, Today, 02:10 AM
    0 responses
    6 views
    0 likes
    Last Post Waxavi
    by Waxavi
     
    Started by TradeForge, Today, 02:09 AM
    0 responses
    14 views
    0 likes
    Last Post TradeForge  
    Started by Waxavi, Today, 02:00 AM
    0 responses
    3 views
    0 likes
    Last Post Waxavi
    by Waxavi
     
    Working...
    X