Help with displaying properties of custom indicator

 

Hi there,


I have created a custom indicator based on the Stochastics oscillator code. It is called MyStochastics and has been successfully compiled in the \experts\indicators folder.

Some additions to the code have been made i.e. adding levels and changes of line style etc. Some example code is below:


#property indicator_level1 80.0
#property indicator_level2 20.0
#property indicator_levelcolor Silver
#property indicator_levelwidth 1
#property indicator_levelstyle STYLE_DASHDOTDOT

#property indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 100
#property indicator_buffers 2
#property indicator_color1 LightSeaGreen
#property indicator_color2 Red



These extra features are displayed when the custom indicator is attached to a chart window by dragging from the Navigator, but when the custom indicator MyStochastics is referenced in an EA code, which is then run in the tester, these features are not displayed and all that is shown are the standard features of the builtin Stochastic oscillator. Below is the EA code I used to reference the custom indicator MyStochastics:


MainLine=iCustom(0,0,"MyStochastic",5,3,3,MODE_SMA,0,MODE_MAIN,0);
SignalLine=iCustom(0,0,"MyStochastic",5,3,3,MODE_SMA,0,MODE_SIGNAL,0);


Does anyone have any ideas why the levels are not displayed in the indicator window when viewed in a chart that has been launched by running an EA in visual mode using the tester?


Thanks.


Wilbur

 

Create a chart template with the things you like to see..

Give the template the same name as the EA

If the EA is named "Moneybags.ex4" then name the template "Moneybags.tpl"

When you run the Ea in visual mode, the template will be applied to the test chart.

 
phy wrote >>

Create a chart template with the things you like to see..

Give the template the same name as the EA

If the EA is named "Moneybags.ex4" then name the template "Moneybags.tpl"

When you run the Ea in visual mode, the template will be applied to the test chart.

Great tip. Thank you.