NexusFi: Find Your Edge


Home Menu

 





how best to place an indicator on a strategy analyzer chart


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
joemiller
Annapolis, Md/USA
 
Posts: 7 since Apr 2013
Thanks Given: 3
Thanks Received: 0

at present the only was i know how to place an indicator on a strategy analyzer graph is by manually clicking on the graph and selecting it from an indicator dropdown list.

i am hoping that a simple few lines of code in a strategy will do the job automatically [ie] apply indicators to the graph. in its simplest form the task might be achieved by a line of code such as "LoadIndicator(indicator name)". I have not yet been able to find such a method of applying an indicator.

if such a feature is not available i will have to hire programming assistance.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Wood Mackenzie Drops $200 Oil Forecast -- Airspace Expir …
Prediction Markets & Event Contracts
Peace Deal Forward Curve: May 22%, June 51%, December 81 …
Prediction Markets & Event Contracts
Iran Airspace Contract Surges to 33.5% as Project Freedo …
Prediction Markets & Event Contracts
$500M Riding on World Cup 2026: France/Spain Co-Favored …
Prediction Markets & Event Contracts
S&P 500 Holds the Line: No Fast Track for SpaceX, Op …
Stocks and ETFs
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
10 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #2 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,117


joemiller View Post
at present the only was i know how to place an indicator on a strategy analyzer graph is by manually clicking on the graph and selecting it from an indicator dropdown list.

i am hoping that a simple few lines of code in a strategy will do the job automatically [ie] apply indicators to the graph. in its simplest form the task might be achieved by a line of code such as "LoadIndicator(indicator name)". I have not yet been able to find such a method of applying an indicator.

if such a feature is not available i will have to hire programming assistance.

If you have a look at the sample strategy SampleMACrossOver that comes with NinjaTrader, you will notice that in the Initialize() section there are two lines

 
Code
Add(SMA(Fast));
Add(SMA(Slow));


This is all that is required to add the plots to your strategy automatically.


Reply With Quote
Thanked by:
  #3 (permalink)
joemiller
Annapolis, Md/USA
 
Posts: 7 since Apr 2013
Thanks Given: 3
Thanks Received: 0


thank you thank you thank you Mr. Fat Tails. are you really in Berlin? not sure if i'm executing this reply correctly... and it appears I got two replies but they look alike so I hope this covers a reply to both. I feel like the sourcerer's apprentice.

your reply looks like its exactly what I need. much appreciated.






Fat Tails View Post
If you have a look at the sample strategy SampleMACrossOver that comes with NinjaTrader, you will notice that in the Initialize() section there are two lines

 
Code
Add(SMA(Fast));
Add(SMA(Slow));


This is all that is required to add the plots to your strategy automatically.


Reply With Quote
  #4 (permalink)
joemiller
Annapolis, Md/USA
 
Posts: 7 since Apr 2013
Thanks Given: 3
Thanks Received: 0

for practice I added the following line of code to my strategy and it worked.
Add(SMA(14));

then for more practice I tried
Add(HeikenAshi);
and got a bunch of errors.

please advise me regarding what I should do next [e.g.] links to study material, study the heikenashi code to maybe figure out what to do, etc.

Thanks,
Joe Miller


Reply With Quote
  #5 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,117


joemiller View Post
for practice I added the following line of code to my strategy and it worked.
Add(SMA(14));

then for more practice I tried
Add(HeikenAshi);
and got a bunch of errors.

please advise me regarding what I should do next [e.g.] links to study material, study the heikenashi code to maybe figure out what to do, etc.

Thanks,
Joe Miller

If you get errors, you need to post the strategy and the errors, and if you are lucky someone will look at it and find out the problem.


Reply With Quote
Thanked by:
  #6 (permalink)
joemiller
Annapolis, Md/USA
 
Posts: 7 since Apr 2013
Thanks Given: 3
Thanks Received: 0

thanks

I will play around with it a bit first, before returning to the Forum


Reply With Quote




Last Updated on May 23, 2013


© 2026 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 - Downloads - Top
no new posts