sigvardsen:
I want to draw straight lines from lets say the closing price of index 100 to the closing price of index 20. How do I do this, without calculating all the values in between? If I give them no value, the indicator does not show anything.
DRAW_SECTION
int init() { if (TLShow) for(int line = TL.max; line >= TL_LOWER;line--) { #define WINDOW_MAIN 0 if (!ObjectCreate( TL_name[line], OBJ_TREND, WINDOW_MAIN,0,0 )) Alert( "TLEA-ObjectCreate(", TL_name[line], ") failed: ", GetLastError() ); else { switch(line) { case TL_TP: color tlc = ColorBuy; break; case TL_SL: tlc = ColorSell; break; case TL_OPEN: tlc = Aqua; break; case TL_UPPER: tlc = TL.UpperColor; break; case TL_LOWER: tlc = TL.LowerColor; break; } // switch(line) if (!ObjectSet( TL_name[line], OBJPROP_COLOR, tlc )) Alert( "TLEA-ObjectSet(", TL_name[line], ", color) failed: ", GetLastError() ); } } } int start() { ... if (!ObjectMove( TL_name[TL_OPEN], 1, Time[1], order.price ) || !ObjectMove( TL_name[TL_OPEN], 0, CurTime(),order.price )) Alert( "TLEA-ObjectMove ", TL_name[TL_OPEN], " (5) failed:", GetLastError() ); ... }
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
I want to draw straight lines from lets say the closing price of index 100 to the closing price of index 20. How do I do this, without calculating all the values in between? If I give them no value, the indicator does not show anything.
Thanks in advance