
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
although there is no error in the code but the indicator is not drawing any horizontal lines
You return after the first execution of the while loop
} return(0); } }
you can remove the return altogether
or move it
} } return; }
Somewhere at the end of the while loop body you need to add an
or else your loop runs forever.You return after the first execution of the while loop
you can remove the return altogether
or move it
yup did that already still no luck, there isn't any error or warning but its still not drawing any horizontal lines
Somewhere at the end of the while loop body you need to add an
or else your loop runs forever.yeah thats exactly what happened , when ever i try to attach the indicator to the chart, mt4 terminal stops responding.
after adding i--; , mt4 is not crashing anymore
as for the indicator, its still not showing any horizontal lines
Replace
with
You will get a lot of horizontal lines though.
You may also wish to put
In OnDeinit so that you are not left with all the lines when you remove the indicator.
Replace
with
You will get a lot of horizontal lines though.
You may also wish to put
In OnDeinit so that you are not left with all the lines when you remove the indicator.
well it displayed some lines,but isn't there a way to draw lines only on recent candle whose hour is defined, there are way too many lines
well it displayed some lines,but isn't there a way to draw lines only on recent candle whose hour is defined, there are way too many lines
so initially i placed everything i can make sense of , but now i have removed the unwanted code and it looks a lot better now.
but i can not figure out a way to make it so that it draw the lines only at the most recent 4:00 candle and not all the 4:00 candle . the current indicator is drawing the lines on all the 4:00 candles on the chart
When you draw a new line, remove the old one with ObjDelete.
can you take a look at the code and tell me if thats where the objdelete is supposed to be ? i have highlighted it
because when i run the code it only display one line (neither high nor low it is places like this )