Hi,
I'm trying to add the "ary-aind-indicator" to my expert using the iCustom function
The indicator is very simple : green bars appears when there is a bullish momentum, and red for bearish momentum. And th indicator returns the bar value which positive for green bars, and negative for red bars. The indicator take one input which the period initially set by default at "27", and have 3 buffers ( for sell and buy, 1 for buy only, and 2 for sell only) from what I understand.
My approach is very simple : if Val > 0 which means green bar the expert should open long position.
if Val < 0 which means red bar the expert should open short position.
So here my issue, sometimes the expert opens short position when Val > 0 (green bar), or the opposite long position when Val < 0 (red bar). Also sometimes it takes the expert 3 or 4 bars turning to green to open a long position which should not happen because the shift is set to "1", the position must open when the first green bar appears.
below here my code (T1 and T2 are used to open one single trade they both initially set at zero and receive incrementation++ when a position is opened. Also find below the indicator and a back test screen shot that shows how it took the expert 3 green bars to open a long position
This is a version of yurik indicator, a famous indicator which repaint, it look good, but it do not work.
do some reseach about repainting indicator
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I'm trying to add the "ary-aind-indicator" to my expert using the iCustom function
The indicator is very simple : green bars appears when there is a bullish momentum, and red for bearish momentum. And th indicator returns the bar value which positive for green bars, and negative for red bars. The indicator take one input which the period initially set by default at "27", and have 3 buffers ( for sell and buy, 1 for buy only, and 2 for sell only) from what I understand.
My approach is very simple : if Val > 0 which means green bar the expert should open long position.
if Val < 0 which means red bar the expert should open short position.
So here my issue, sometimes the expert opens short position when Val > 0 (green bar), or the opposite long position when Val < 0 (red bar). Also sometimes it takes the expert 3 or 4 bars turning to green to open a long position which should not happen because the shift is set to "1", the position must open when the first green bar appears.
below here my code (T1 and T2 are used to open one single trade they both initially set at zero and receive incrementation++ when a position is opened. Also find below the indicator and a back test screen shot that shows how it took the expert 3 green bars to open a long position