![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
The EA draws the indicator I use in iCustom in seperate window. It seems the values posted in this window differ from the ones the EA uses.
Is this a common problem ?
Thanks, BB
The reason they differ is because they are called from and used in different ways.
1) The EA calls the indicator and uses it in its computations. There is no display involved in the step.
2) The same indicator can also be attached to a chart, and that gives you the chart display that you see.
One can happen without the other quite happily. Or both can happen at the same time using different parameters and that typically accounts for the differences that you see.
Or you may not even be calling the same indicators that you thought you were.
hey brian..... it's possible for the values to be different....... now as to whether it's a problem or not for your situation, of course we could not say without knowing more.....
//----------------
i code experts and indicators all day everyday ...... seldom post replys due to lack of time..... but your deal here has me courious.......
could it be possible your using a template, and the template includes both the ea and the indicator....... or are you running backtests and then opening the charts and seeing the indicators..... or are you running backtests and your "tester template" contains the indicator......
basically what i'm asking are you absolutely sure the ea is ploting the indicator in a seperate window.....
i can visualize an ea ploting "lines" and such using the object functions....
if(ObjectFind("Next Buy") == -1)
{
ObjectCreate ("Next Buy", OBJ_HLINE, 0, Time[0], NextBuy());
ObjectSet ("Next Buy", OBJPROP_WIDTH, 1); //1 to 5.
ObjectSet("Next Buy",OBJPROP_COLOR,Blue);
ObjectSet ("Next Buy", OBJPROP_STYLE, STYLE_SOLID);
}
else
{
ObjectMove("Next Buy", 0, Time[0], NextBuy());
}
if(ObjectFind("Next Sell") == -1)
{
ObjectCreate ("Next Sell", OBJ_HLINE, 0, Time[0], NextSell());
ObjectSet ("Next Sell", OBJPROP_WIDTH, 1); //1 to 5.
ObjectSet("Next Sell",OBJPROP_COLOR,Red);
ObjectSet ("Next Sell", OBJPROP_STYLE, STYLE_SOLID);
}
else
{
ObjectMove("Next Sell", 0, Time[0], NextSell());
}
//-------------------
........ holler back if ya have the time, we should be able to figure out your problem.......h
//----
and btw, even though you might not feel it now, phy is one of the most knowlegable mq4 contributers.........h
Thanks for the reply.
I am doing backtests, and then it is drawn in the tester window.
Problem these drawings differing from normal, is now fixed. However, I still don't understand why sometimes the EA does things that do not correspond to the drawings in the tester. IE values of lines do no correspond to the EA data.
Thanks for the reply.
I am doing backtests, and then it is drawn in the tester window.
Problem these drawings differing from normal, is now fixed. However, I still don't understand why sometimes the EA does things that do not correspond to the drawings in the tester. IE values of lines do no correspond to the EA data.
hey brian..... Problem these drawings differing from normal, is now fixed......... glad to hear you have it sorted out.....
//-----
the EA does things that do not correspond to the drawings in the tester ..... perhaps your ea is using an indicator that is subject to repainting..... this is very common....... the ea is making decisions at a precise moment and the tester is applying the indicator after the test is complete.....
if the ea appears to be buying/selling/closing out of place, run the backtest slowly in visual mode with your indicator applied to the chart..... if the indicator is posted somewhere on the net, or we knew it's name, odds are we could say for sure........h
hey brian..... Problem these drawings differing from normal, is now fixed......... glad to hear you have it sorted out.....
//-----
the EA does things that do not correspond to the drawings in the tester ..... perhaps your ea is using an indicator that is subject to repainting..... this is very common....... the ea is making decisions at a precise moment and the tester is applying the indicator after the test is complete.....
if the ea appears to be buying/selling/closing out of place, run the backtest slowly in visual mode with your indicator applied to the chart..... if the indicator is posted somewhere on the net, or we knew it's name, odds are we could say for sure........h
I have this issue with donchian channels version 1 and with nolag ma version 7.
My EA does not head the indicatior what so ever. One of my conditions is do not buy if the donchian is less than the no lag, or greater than on a sell. No matter what I do I can not stop it from buying at the peak of the trend.
Its my only issue... otherwise my EA is running at 87-90% wins. That 1 loss is constant though and often times, negates the entire next trend. I have no idea how the heck I'm even hitting soooo many wins.
Any good indicators that work for halting trades at the top of the channel? Cause this aint working... Its suppose to halt trading after the donchian crosses the nolag and what ever trades where made prior to that should trailing stop / modify their way up the channel till it crests...
Is iMA function reliable ?
Is iMA function reliable ?