Hello all,
Is it possible to raw a graphic (line) on gaphic with MT4 ?
Thanks for your prompt answer.
I tried ti implement it but it seems to not work.
I add it on my code :
<SNIP>
then in the start() session :
objTrendLine("Test", 1357492150, 3700,1357492854, 3731.5,0,1,0,STYLE_SOLID, true);
Could you pelase give me an exemple ?
Thanks
Thanks for your prompt answer.
I tried ti implement it but it seems to not work.
I add it on my code :
<SNIP>
then in the start() session :
objTrendLine("Test", 1357492150, 3700,1357492854, 3731.5,0,1,0,STYLE_SOLID, true);
Please use this to post code . . . it makes it easier to read.
Thanks for your prompt answer.
I tried ti implement it but it seems to not work.
Your function call may be wrong, you seem to have a colour of 0
Please edit your post . . .
Please use this to post code . . . it makes it easier to read.
It works now. Thanks.
I used : DateTime = D'04.01.2013 18:24:27' (it's easier to locate on graph) and now it appears on my graph!
I tried to make a Griphical Analyse with program.
How do we delete the line on graph ?
Use ObjectDelete() . . .
Please edit the code in your earlier post. Use the SRC button . . .
Please edit the code in your earlier post. Use the SRC button . . .
//+------------------------------------------------------------------+ //| aaa_mytest.mq4 | //| me | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "me" #property link "http://www.metaquotes.net" #property indicator_separate_window void objTrendLine(string name, datetime time_1, double price_1, datetime time_2, double price_2, int window=0, int width=3, color col=Black, int style=STYLE_SOLID, bool ray=true) { if(ObjectFind(name)==-1) { ObjectCreate(name, OBJ_TREND, window, time_1, price_1, time_2, price_2); } ObjectSet(name, OBJPROP_PRICE1, price_1); ObjectSet(name, OBJPROP_PRICE2, price_2); ObjectSet(name, OBJPROP_TIME1, time_1); ObjectSet(name, OBJPROP_TIME2, time_2); ObjectSet(name, OBJPROP_WIDTH, width); ObjectSet(name, OBJPROP_COLOR, col); ObjectSet(name, OBJPROP_STYLE, style); ObjectSet(name, OBJPROP_RAY, ray); } //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); Print("counted_bars=",counted_bars); objTrendLine("EURUSD",D'04.01.2013 22:28:27',1.3088, D'04.01.2013 23:58:27',1.3070,0,1,Black,STYLE_SOLID,true); // if(Close[0]<Line) { Print("Down"); } if(Close[0]>Line) { Print("Up"); } //---- //---- return(0); } //+------------------------------------------------------------------+
I draw a Line on "EURUSD" and i would like to compare the Close[0] position with the Line.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello all,
Is it possible to raw a graphic (line) on gaphic with MT4 ?
Thnaks for your answer.
See you!