Download MetaTrader 5

how to not plot a built-in indicator

To add comments, please log in or register
rlarz
53
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.

Keith Watford
Moderator
10566
Keith Watford  
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  
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
15567
whroeder1  
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  
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
10566
Keith Watford  
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
10566
Keith Watford  
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  
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
175
Paul B  

Just include

HideTestIndicators(true);

 in you init.

rlarz
53
rlarz  
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