Hi all pro coders,
Im learning coding mql4.
Im coding a volume horizonal line that will pick up last 100 highest volume bars from the recent 300 volume bars, averaging them & then draw a horizonal line at Bar No.0 on a tick VOLUME indicator.
But I got some problem & dont know why it appears nothing & How to code it o apply on a volume indicator? No Errors found!
Please help me! show me my mistakes
Thanks the Forum & all pro coders , I ve learnt alot :)
regard,
Im no expert but I would expect to see VolExtr_line[i] here:
VolExtr_line[1]=av;
The problem is minimum and maximum are the same value.
av=0; for (int u =0; u<=99; u++) { av = av+Vol_300bars[u]; } av=av/100; //------------ VolExtr_line[3]=av+av/2; VolExtr_line[2]=av-av/2; VolExtr_line[1]=VolExtr_line[0]=av; ObjectCreate("vol_extr",OBJ_HLINE,ChartWindowFind(),0,0); ObjectSet("vol_extr",OBJPROP_PRICE1,av); ObjectSet("vol_extr",OBJPROP_COLOR,clrRed);
The problem is minimum and maximum are the same value.
Thank you so much!
great! It works, Sorry But I still dont get the logic why we have to add these lines instead of just put ...VolExtr_line[0]=av ? Could you please give me some more explaination :)
VolExtr_line[3]=av+av/2; VolExtr_line[2]=av-av/2; VolExtr_line[1]=av;
Thank you so much!
great! It works, Sorry But I still dont get the logic why we have to add these lines instead of just put ...VolExtr_line[0]=av ? Could you please give me some more explaination :)
You're welcome.
VolExtr_line[3]=av+av/2; //Sets the window maximum VolExtr_line[2]=av-av/2; //Sets the window minimum VolExtr_line[1]=av;
You're welcome.
Thanks Ernst!
Have a good day! & Green Pips :)
- 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 all pro coders,
Im learning coding mql4.
Im coding a volume horizonal line that will pick up last 100 highest volume bars from the recent 300 volume bars, averaging them & then draw a horizonal line at current volume Bar on a tick VOLUME indicator.
But I got some problem & dont know why it appears nothing & How to code it o apply on a volume indicator? No Errors found!
Please help me! show me my mistakes
Thanks the Forum & all pro coders , I ve learnt alot :)
regard,