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,757 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?
Irans Answer Due Today: Peace Surges to 33.5%, Invasion …
Prediction Markets & Event Contracts
Weekend Update: First Qatari LNG Transit Attempted -- IR …
Traders Hideout
The 50/50 Paradox: Peace and Invasion Each at 20% -- Ira …
Prediction Markets & Event Contracts
South Korea Suspends Bithumb for Six Months Over AML Fai …
Cryptocurrency
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #2 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
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,114


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
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,114


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