Hi
I would do it by using two indicators one draws a separate window and the other puts arrows on the chart. It is the same indicator code just different output screens. I have never tried but I think you might be able to call the two indicators from a third so you can put just one indicator on the chart that draws both.
Hi,
I found out that the MQL4 doesn't allow me to do so - I have to choose to show the indicator in a separate window or in the chart window - I can't do both within the same code. You are right - I have to code two indicators.
Thanks for your answer
I remember this same problem and I used ObjectCreate("Name", OBJ_ARROW, 0, time, price)to get around it. The 0 in this allows us to create an object, in this case an arrow or some other wingding, in the main window at location time and price. Use the other ObjectSet functions to finetune it.
Hope this helps as it is my first post here.
good thinking flyer, the third actual is the window index - so one program can shove objects on many windows by using correct window index/id.
enjoy time here.
Hi,
I'm trying to use the solution with . It seems to work but I still have one little problem :
My code is the following :
ObjectCreate(name, OBJ_ARROW, 0, TimeCurrent(), Low[i] - 0,0020);
Since I want to show both the past crossover and the futures ones, I add 1 to my variable "name" so a new object is created every round but using TimeCurrent(), all my arrows are created around the last bar and where they should be.
My question is : what do I have to use instead of TimeCurrent() so each arrow is placed at its own crossover and not at the last bar ?
Thanks for your help.
Not see all code, but you can try Time[i - 1]; ie, one bar further right than Low[i]
[assumes i>0]
Not see all code, but you can try Time[i - 1]; ie, one bar further right than Low[i]
[assumes i>0]
Perfect - thanks a lot
- 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,
I need your help. How can I do to show an indicator in a separate window and also arrows for each crossover in the chart window.
In my code, I have to write #property indicator_separate_window at first for the indicator but when I add the code for the arrows, they show themselves in the separate window along with the indicator.
Thanks for your help.