A question for MQL connoisseurs - page 6 1234567891011 New comment Рита 2010.08.17 19:18 #51 nikost: ObjectCreate("DevIM0", OBJ_TRIANGLE, window, Time[0]+5500, 0,Time[0]+8500, 30,Time[0]+8500, -1*30); The triangle is also quite good Inserted your line. But I don't see any triangle in the window. Maybe something else needs to be added? ObjectSet etc. ? int start() { ObjectCreate("DevIM0", OBJ_TRIANGLE, WindowFind(WindowExpertName()), Time[0]+5500, 0,Time[0]+8500, 30,Time[0]+8500, -1*30); } //----------------------------------------------------- return(0); } Rustamzhan Salidzhanov 2010.08.17 19:58 #52 ObjectCreate("asd", OBJ_LABEL, WindowFind(WindowExpertName()), 0,0); ObjectSetText("asd", '\x70', "Wingdings 3");// '\x71' ObjectSet("asd", OBJPROP_COLOR , Red); ObjectSet("asd", OBJPROP_XDISTANCE, 10); ObjectSet("asd", OBJPROP_YDISTANCE, 10); ObjectSet("asd", OBJPROP_CORNER , 3); ObjectSet("asd", OBJPROP_FONTSIZE , 18); Рита 2010.08.17 20:23 #53 Rita: Inserted your line. But I don't see the triangle in the box. Maybe something else needs to be added? ObjectSet etc. ? It worked, finally: Рита 2010.08.17 20:24 #54 xrust: Thanks, xrust. I'll look into it now. Рита 2010.08.18 12:08 #55 Not quite clear again. I drew a triangle in the indicator window: #property indicator_separate_window extern bool ТРЕУГОЛЬНИК=true ; int init() { return(0); } int deinit() { return(0); } int start() { int counted_bars=IndicatorCounted(); //---- проверка на возможные ошибки if(counted_bars<0) return(-1); //---- последний посчитанный бар будет пересчитан if(counted_bars>0) counted_bars-=10; //------------------------------------------------------------ int limit=Bars - IndicatorCounted(); int k; for(k = 0; k < limit; k++) { .... .... .... if (ТРЕУГОЛЬНИК==true ) ObjectCreate("DevIM0", OBJ_TRIANGLE, WindowFind(WindowExpertName()), Time[0]+3500, 0,Time[0]+9500, 0.2,Time[0]+9500, -1*0.2); } //----------------------------------------------------- return(0); } However, the condition TRAGON==true is not seen by the indicator. The triangle is always drawn, no matter what TRUE or FALSE I switch in the external parameters! Why so ? Why is this not Flow control using char Object disappeares after changing Rustamzhan Salidzhanov 2010.08.18 13:13 #56 Do you remember to delete it in the deinité? Is it unkosher to put brackets around the clause? Рита 2010.08.18 13:32 #57 The brackets don't help. In deinit, yes, it didn't. I'll put a deletion there now. Rustamzhan Salidzhanov 2010.08.18 13:40 #58 The brackets should be... and full stop :). or reverse the condition and retort :)) Рита 2010.08.18 20:57 #59 I put the brackets in. And did a deletion in Deinit. The switch TRUE==true/false worked ! But now a new problem has turned up. On redrawing the triangle when changing its direction. Now I will put the question here tomorrow. Can somebody help me Experiment Help implementing a MT4 Rustamzhan Salidzhanov 2010.08.18 21:01 #60 You draw it on every tick... 1234567891011 New comment
ObjectCreate("DevIM0", OBJ_TRIANGLE, window, Time[0]+5500, 0,Time[0]+8500, 30,Time[0]+8500, -1*30);
The triangle is also quite good
Inserted your line. But I don't see any triangle in the window.
Maybe something else needs to be added?
ObjectSet etc. ?
Inserted your line. But I don't see the triangle in the box.
Maybe something else needs to be added?
ObjectSet etc. ?
It worked, finally:
Thanks, xrust.
I'll look into it now.
Not quite clear again.
I drew a triangle in the indicator window:
However, the condition TRAGON==true is not seen by the indicator.
The triangle is always drawn, no matter what TRUE or FALSE I switch in the external parameters!
Why so ?
Do you remember to delete it in the deinité?
Is it unkosher to put brackets around the clause?
The brackets don't help.
In deinit, yes, it didn't. I'll put a deletion there now.
The brackets should be... and full stop :). or reverse the condition and retort :))
I put the brackets in. And did a deletion in Deinit.
The switch TRUE==true/false worked !
But now a new problem has turned up. On redrawing the triangle when changing its direction.
Now I will put the question here tomorrow.
You draw it on every tick...