darkcanvas: but I want this to do that on every chart. How do I do that?
Make it an indicator, and put it on every chart.
Loop over every chart (outer loop) then loop over every object on that chart (inner loop).
whroeder1:
Make it an indicator, and put it on every chart.
Thanks,
I needed the lines to be drawn permanently, and shown on every time frame, so indicator was out.
I'm just doing it one chart at a time.
nicholi shen:
Loop over every chart (outer loop) then loop over every object on that chart (inner loop).
Yeah,
I tried that, but could not make it work.
It did it on 1 chart but refused to cycle through all the charts.
Ended up just using it on 1 chart at a time. It's just a matter of speeding up drawing alert lines.
You need get Chart ID of each chart, then use ObjectCreate
bool ObjectCreate( long chart_id, // chart ID string object_name, // object name ENUM_OBJECT object_type, // object type int sub_window, // window index datetime time1, // time of the first anchor point double price1, // price of the first anchor point ... datetime timeN=0, // time of the N-th anchor point double priceN=0 // price of the N-th anchor point );

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
My script looks for a couple of trendlines with specific names and draws another line on top of it, which can then be seen by an alert function.
I am able to execute that script on the current chart, but I want this to do that on every chart. How do I do that?