at least in init you have to set IndicatorBuffers(2)
and are you sure that your calculation of range and the resulting drawingposition is in the visible area of the chart ?
Seriously I don't know. With th original code, the drawingposition are ok.
I've change:
CrossUp[i] = Low[i] - Range*0.5;
With:
CrossUp[i] = Low[i] - 5*Point;
Same bug.
I've juste change iMA of the original code with iMACD.
And 2 buffer are set.
SetIndexStyle(0, DRAW_ARROW, EMPTY); SetIndexArrow(0, 233); SetIndexBuffer(0, CrossUp); //0 = Buffer1 SetIndexStyle(1, DRAW_ARROW, EMPTY); SetIndexArrow(1, 234); SetIndexBuffer(1, CrossDown); //1 = Buffer2
i have seen that the numbers of buffers is set as property.
next time use the strategytester please over a longer period in the visible mode until you see some results on the chart
the code works, if there are no arrows visible the reason is simple:
((macdPrev < 0) && (macd > 0))==false; //or ((macdPrev > 0) && (macd < 0))==false;
i have already wasted my time for you with a non-existing problem.
instead of you take my advise and say thanks you think you know it better than me.
i think the problem is between chair and keyboard.
Ok thank's for your help. The problem is maybe me. I just show you a print screen of my result.
I don't know why but it's not work for me.
I think than a forum is create to help people with their problem.
Your last comment don't help anybody.
Thank's again!
pgforex
Ok I try again!
Thank's
pgforex
"How to test an indicator with strategytester? It's not juste for EA?"
how to develop an indicator WITHOUT strategy tester ?
waiting on the next tick to come and stopping developin at the weekend ?
the usage is simple, test an EA in visual mode and attach the indicator as usual by drag and drop.
sometimes i think that a lot of questions here in the forum are based on "not reading the manual"
Thank's to explain how to test indicator with strategytester. My indicator work now. Normaly when I add
an indicator on live chart, I can see the signal on previous bars. Not with my code. With my code I see a
signal only next time when condition are meet.
I'm not sure, I think is due to the next code. Tell me if it's right. This code calculate only the 9 previous
bars.
for (counter=i ;counter<=i+9;counter++)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello, I tried to modify an indicator with my parameters. I want an up arrow when MACD < 0 and become greater than 0 and vise versa.
I juste modify iMA with my iMACD. Now there's any arrow on the chart.
Thank's
pgforex