Download MetaTrader 5
To add comments, please log in or register
Move from theory to practice. Code Base will help you!
rlarz
53
rlarz 2014.09.20 17:31 

Is it possible to use a built-in indicator in an EA without having the indicator plot on the chart? If so, how?

For example, if I want to use iATR to calculate stops but I don't want the ATR visible on the chart.

Keith Watford
Moderator
7873
Keith Watford 2014.09.20 19:35  
rlarz:

Is it possible to use a built-in indicator in an EA without having the indicator plot on the chart? If so, how?

For example, if I want to use iATR to calculate stops but I don't want the ATR visible on the chart.

Using iATR in your EA will only refer to the indicator, it will not put the indicator on your chart.
rlarz
53
rlarz 2014.09.20 19:54  
GumRai:
Using iATR in your EA will only refer to the indicator, it will not put the indicator on your chart.
but it does put it there (in a different window of course)
whroeder1
13593
whroeder1 2014.09.20 21:39  
EA's have no hands, no mouse, they can NOT put any indicator on your chart. You (or your default/tester template) put it there.
rlarz
53
rlarz 2014.09.20 22:24  
WHRoeder:
EA's have no hands, no mouse, they can NOT put any indicator on your chart. You (or your default/tester template) put it there.
You might be right about the indicators presence on the chart having something to do with a template. However, the templates don't have hands either and I am unable to reach into the screen to fix it. Never mind, I'll just figure it out myself.
Keith Watford
Moderator
7873
Keith Watford 2014.09.21 01:01  
rlarz:
You might be right about the indicators presence on the chart having something to do with a template. However, the templates don't have hands either and I am unable to reach into the screen to fix it. Never mind, I'll just figure it out myself.

Open a clean chart with no indicators attached

Attach your EA

Does the ATR suddenly appear on the chart?

If so, show the EA's code and somebody will tell you why.

Keith Watford
Moderator
7873
Keith Watford 2014.09.21 01:04  
rlarz:
but it does put it there (in a different window of course)
Just to be clear, are you talking about using the EA on a live chart or are you talking about using the Strategy Tester?
rlarz
53
rlarz 2014.09.21 19:33  
GumRai:
Just to be clear, are you talking about using the EA on a live chart or are you talking about using the Strategy Tester?
I did manage to figure out the problem on my own. It only happens in the Strategy Tester and that makes sense. Thanks for responding without smart aleck comments.
Paul B
173
Paul B 2014.09.21 20:59  

Just include

HideTestIndicators(true);

 in you init.

rlarz
53
rlarz 2014.09.23 10:13  
Paul_B:

Just include

 in you init.

Excellent. Thank you for a direct, precise and correct answer. My hat off to you and GumRai for offering real help.
/
To add comments, please log in or register