Unproper creation of support and resistance lines
MaksGroup: I've created robot which shall draw trendlines based on two closest fractals. If new fractal is true lines shall be redrawed.
You create one trendline for support and one for resistance. No where do you create the second. No where do you delete the old ones.
whroeder1:
You create one trendline for support and one for resistance. No where do you create the second. No where do you delete the old ones.
You create one trendline for support and one for resistance. No where do you create the second. No where do you delete the old ones.
There is deletion of all existing lines if New Bar is true. Please see first lines of OnTick () function.
void OnTick() { // удаляем все линии и очищаем массивы при появлении нового бара if(NewBar()) { if (ObjectFind(0,"Support")) ObjectDelete(0,"Support"); if (ObjectFind(0,"Resistance")) ObjectDelete(0,"Resistance"); ArrayFree(UpTime_1); ArrayFree(UpTime_2); ArrayFree(LowTime_1); ArrayFree(LowTime_2); ArrayFree(FractalDown); ArrayFree(FractalUp); }
Hi everybody,
I've created robot which shall draw trendlines based on two closest fractals. If new fractal is true lines shall be redrawed. Unfortunately tester shows that just the closest fractal is taken into consideration the second fractal is as initial one and unchanged during whole test. Therefore after while I have wrong trendlines.
Will appreciate your comments.