I created 3 Objects and that objects crossover each others.
#1 Horizontal Line, #2 Vertical Line, #3 Trendline
I need to set them z positions.
So how can I give them z positions value?
Well you can draw all lines in OnInit() and then draw new whenever the opentime from the last bar changes you will know there was a new bar.
But i am not sure what exactly you are wanting to do.
OK! I will try something. Then I will come back to here.
@Marco vd Heijden
Before I start research about that. I really need to ask, is start() function slows down chart (/ MT4 Platforms)?
p.s I put all codes in start() special function, that code's works for Period Lines - H1, H4, D1, W1, MN1.
Have a nice weekend & thanks in advance.
Thank you for your comment. (after your comment I decided I will change something all in my indicators - because almost I made all my indicators in start() function.)
I put below code in start() function, so can you help me which way is good for my indicator?
Actually I have not any idea how can I edit below code for stop continuously updating (without all start() codes put in init() function).
I really need help, please someone answer my question.
Please put it in an expert in stead of indicator this allows easier use in the future when you want to add your trading strategy.
For the bars issue, store the bar opening time in a datetime variable and simply compare the recorded time with the real time then whenever a new bar arises it will trigger.
Here is an example:
Thanks for your comment.
Since your comment I was started trying to research your comment. (because I never used 'Void OnTick()' function)
Anyway, Mr William your comment really gave me idea and also teach me something.
(p.s if I am thinking wrong please let me know)
Pre-build 600 (February 3, 2014) there was only start(). Now there is OnTick (EAs,) OnCalculate (indicators,) and OnStart (scripts.) I forgot you were talking about an indicator.
Start using the new Event Handling Functions - Functions - Language Basics - MQL4 Reference. See How to do your