Hi Timerider, it's my first time on this forum.
Excuse my English, I'm french
I would add an index in the call of the function incremented each time, delete the lines //---delete Lines; ObjectDelete(0,"V ... and replace
ObjectCreate(0,"H Line",OBJ_HLINE,window,dt,price);
ObjectCreate(0,"V Line",OBJ_VLINE,window,dt,price);
with:
ObjectCreate("H Line"+index,OBJ_HLINE,window,0,0);
ObjectSet("H Line"+index,OBJPROP_PRICE1,price);
ObjectCreate("V Line"+index,OBJ_HLINE,window,0,0);
ObjectSet("V Line"+index,OBJPROP_TIME1,dt);
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
Hi guys,
I want to create a graphical object with every mouse click. For that I use the CHARTEVENT_CLICK function. But I always just draw e.g one H-Line and when I press the mouse again, it is deleted and another is drawn. But I want to prevent that and draw one line after the other without deleting any. As an example, I just took a code from the Codebase, which you can also see here. This indicator draws a crosshair everytime you click, at the specific coordinates from the mouse. But I want that the old crosshair stays and isn't deleted. How can I do that? Thanks for your help.