NexusFi: Find Your Edge


Home Menu

 





Using multiple charts - one strategy


Discussion in NinjaTrader

Updated
    1. trending_up 2,043 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Using multiple charts - one strategy

  #1 (permalink)
AA Ron
denver, colorado
 
Posts: 4 since Oct 2015
Thanks Given: 8
Thanks Received: 0

I'm looking to improve my existing automated strategy. Currently its running on a Renko 3 chart, but I would like to also have it do the same analysis on a Range 4 chart and possibly others, then make buy decisions on a polling basis.

Is this possible in ninjascript? Any Examples?

I've looked through the SampleMultiInstrument example in ninja trader but they don't seem to add more then one instrument or show how to use them independently.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
Cheap historycal L1 data for stocks
Stocks and ETFs
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
 
  #3 (permalink)
 
stoicbuddha's Avatar
 stoicbuddha 
Seattle, WA
 
Experience: Intermediate
Platform: NinjaTrader 8
Broker: AMP/CQG
Trading: Indices
Frequency: Every few days
Duration: Minutes
Posts: 96 since Feb 2012
Thanks Given: 1,054
Thanks Received: 96


I uses a two chart system myself. The first is a non-renko chart and the second is a renko chart. created alerts based on indicators on both charts, but the strategy is applied to the main chart. Here are some snippets on how I did it.

Keeping in mind this strategy is being placed on the non-renko chart, I need to "add" a renko chart to it during initialization:


protected override void Initialize()
{
CalculateOnBarClose = true;
Add(PeriodType.Final2, 6);
}

then later, in the OnBarUpdate section, i first need to specify what to do for ticks relate to each chart:

protected override void OnBarUpdate()
if (BarsInProgress == 0)
{logic for non-renko main chart}
else if (BarsInProgress == 1)
{logic for secondary renko chart}

Using this format you can theoretically as much info from as many charts as you need, though I only use two, so YMMV. Also, PeriodType.Final2 is specific to the "WickedRenko" which is what I use.

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
AA Ron
denver, colorado
 
Posts: 4 since Oct 2015
Thanks Given: 8
Thanks Received: 0


happyrenko View Post
I uses a two chart system myself. The first is a non-renko chart and the second is a renko chart. created alerts based on indicators on both charts, but the strategy is applied to the main chart. Here are some snippets on how I did it.

Keeping in mind this strategy is being placed on the non-renko chart, I need to "add" a renko chart to it during initialization:


protected override void Initialize()
{
CalculateOnBarClose = true;
Add(PeriodType.Final2, 6);
}

then later, in the OnBarUpdate section, i first need to specify what to do for ticks relate to each chart:

protected override void OnBarUpdate()
if (BarsInProgress == 0)
{logic for non-renko main chart}
else if (BarsInProgress == 1)
{logic for secondary renko chart}

Using this format you can theoretically as much info from as many charts as you need, though I only use two, so YMMV. Also, PeriodType.Final2 is specific to the "WickedRenko" which is what I use.


Thank you for the response. Just to make sure I understand this right, if I added a 3rd chart to the strategy would this be referenced as such:

else if (BarsInProgress == 2)
{ do something with 3rd chart }

is that understanding correct?

Reply With Quote
  #5 (permalink)
 
stoicbuddha's Avatar
 stoicbuddha 
Seattle, WA
 
Experience: Intermediate
Platform: NinjaTrader 8
Broker: AMP/CQG
Trading: Indices
Frequency: Every few days
Duration: Minutes
Posts: 96 since Feb 2012
Thanks Given: 1,054
Thanks Received: 96


AA Ron View Post
Thank you for the response. Just to make sure I understand this right, if I added a 3rd chart to the strategy would this be referenced as such:

else if (BarsInProgress == 2)
{ do something with 3rd chart }

is that understanding correct?

Yes

Visit my NexusFi Trade Journal Reply With Quote




Last Updated on December 9, 2015


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts