Coding help - page 400

 
DMNIK:
Hello! You can untie from the demo version.

Sorry, can not change ex4 file

 
makototokyo:
Hello,

I need help to make the alert work. it works fine but about at 35% of time it doesn't make the sound when there is signal. could anyone take a look and fix it.

Thank you very much.

Hi Makototokyo,

That is the compiled run time version (.ex4) and cannot be changed.

You need the source code to be able to change anything in the indicator.

Try to find and upload the .mq4 source code...and someone can help you then.

Hope this helps,

Robert

 
dansmol:
Gentlemen

It can be done?

Respects

Dan

What is M-Candle? Or MultiPair trend_v2.1?

 

Hi, a question on the fly...

i'm writing this simple indicator but i don't know yet how to use the "if" instruction. Could you give me the answer on this? Thanks

#property indicator_chart_window

extern string LBL1_FontType = "Tahoma"; //Font type label 1

extern color LBL1_FontColor = Black; //Font color label 1

extern int LBL1_FontSize = 18; //Font size label 1

extern string LBL2_FontType = "Arial"; //Font type label 2

extern color LBL2_FontColor = Green; //Font color label 2

extern int LBL2_FontSize = 12; //Font size label 2

extern string LBL3_FontType = "Tahoma"; //Font type label 3

extern color LBL3_FontColor = Black; //Font color label 3

extern int LBL3_FontSize = 10; //Font size label 3

extern string LBL4_FontType = "Tahoma"; //Font type label 3

extern color LBL4_FontColor = DarkViolet; //Font color label 3

extern int LBL4_FontSize = 8; //Font size label 3

extern string LBL5_FontType = "Tahoma"; //Font type label 4

extern color LBL5_FontColor = DarkViolet; //Font color label 4

extern int LBL5_FontSize = 8; //Font size label 4

extern string LBL6_FontType = "Tahoma"; //Font type label 5

extern color LBL6_FontColor = DarkViolet; //Font color label 5

extern int LBL6_FontSize = 8; //Font size label 5

extern int Corner = 1; //Position corner

extern int Xpos = 10; //X position label 1

extern int Ypos = 10; //Y position label 2

// Symbol_Name = "Symbol name"; //Text label 1

extern string Rb_Size = "rb2"; //Text label 2

extern int Contract_Size = 1; //Text label 3

extern double Tick_Value = 12.5; //Text label 4

extern double Margin = 2500; //Text label 5

extern double Commissions = 3.12; //Text label 6

extern string Currency = "€";

extern bool FullVersion = false; //enable / disable full labels list

//--------------------------------

int init()

{

return(0);

}

//--------------------------------

int deinit()

{

ObjectDelete("Label_1");

ObjectDelete("Label_2");

ObjectDelete("Label_3");

ObjectDelete("Label_4");

ObjectDelete("Label_5");

ObjectDelete("Label_6");

return(0);

}

//---------------------------------

int start()

{

ObjectCreate("Label_1", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_1", Symbol(), LBL1_FontSize, LBL1_FontType, LBL1_FontColor);

ObjectSet("Label_1", OBJPROP_CORNER, Corner);

ObjectSet("Label_1", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_1", OBJPROP_YDISTANCE, Ypos);

ObjectCreate("Label_2", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_2", Rb_Size, LBL2_FontSize, LBL2_FontType, LBL2_FontColor);

ObjectSet("Label_2", OBJPROP_CORNER, Corner);

ObjectSet("Label_2", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_2", OBJPROP_YDISTANCE, Ypos+30);

if (FullVersion = true)

{

ObjectCreate("Label_3", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_3", "CONTRACT SIZE: "+Contract_Size, LBL3_FontSize, LBL3_FontType, LBL3_FontColor);

ObjectSet("Label_3", OBJPROP_CORNER, Corner);

ObjectSet("Label_3", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_3", OBJPROP_YDISTANCE, Ypos+80);

ObjectCreate("Label_4", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_4", "tick value: "+Tick_Value*Contract_Size+" "+Currency, LBL4_FontSize, LBL4_FontType, LBL4_FontColor);

ObjectSet("Label_4", OBJPROP_CORNER, Corner);

ObjectSet("Label_4", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_4", OBJPROP_YDISTANCE, Ypos+100);

ObjectCreate("Label_5", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_5", "margin: "+Margin*Contract_Size+" "+Currency, LBL5_FontSize, LBL5_FontType, LBL5_FontColor);

ObjectSet("Label_5", OBJPROP_CORNER, Corner);

ObjectSet("Label_5", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_5", OBJPROP_YDISTANCE, Ypos+112);

ObjectCreate("Label_6", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_6", "commissions: "+Commissions*Contract_Size+" "+Currency, LBL6_FontSize, LBL6_FontType, LBL6_FontColor);

ObjectSet("Label_6", OBJPROP_CORNER, Corner);

ObjectSet("Label_6", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_6", OBJPROP_YDISTANCE, Ypos+124);

}

return(0);

}

//+------------------------------------------------------------------+
 
thefxpros:
Hi, a question on the fly...

i'm writing this simple indicator but i don't know yet how to use the "if" instruction. Could you give me the answer on this? Thanks

#property indicator_chart_window

extern string LBL1_FontType = "Tahoma"; //Font type label 1

extern color LBL1_FontColor = Black; //Font color label 1

extern int LBL1_FontSize = 18; //Font size label 1

extern string LBL2_FontType = "Arial"; //Font type label 2

extern color LBL2_FontColor = Green; //Font color label 2

extern int LBL2_FontSize = 12; //Font size label 2

extern string LBL3_FontType = "Tahoma"; //Font type label 3

extern color LBL3_FontColor = Black; //Font color label 3

extern int LBL3_FontSize = 10; //Font size label 3

extern string LBL4_FontType = "Tahoma"; //Font type label 3

extern color LBL4_FontColor = DarkViolet; //Font color label 3

extern int LBL4_FontSize = 8; //Font size label 3

extern string LBL5_FontType = "Tahoma"; //Font type label 4

extern color LBL5_FontColor = DarkViolet; //Font color label 4

extern int LBL5_FontSize = 8; //Font size label 4

extern string LBL6_FontType = "Tahoma"; //Font type label 5

extern color LBL6_FontColor = DarkViolet; //Font color label 5

extern int LBL6_FontSize = 8; //Font size label 5

extern int Corner = 1; //Position corner

extern int Xpos = 10; //X position label 1

extern int Ypos = 10; //Y position label 2

// Symbol_Name = "Symbol name"; //Text label 1

extern string Rb_Size = "rb2"; //Text label 2

extern int Contract_Size = 1; //Text label 3

extern double Tick_Value = 12.5; //Text label 4

extern double Margin = 2500; //Text label 5

extern double Commissions = 3.12; //Text label 6

extern string Currency = "€";

extern bool FullVersion = false; //enable / disable full labels list

//--------------------------------

int init()

{

return(0);

}

//--------------------------------

int deinit()

{

ObjectDelete("Label_1");

ObjectDelete("Label_2");

ObjectDelete("Label_3");

ObjectDelete("Label_4");

ObjectDelete("Label_5");

ObjectDelete("Label_6");

return(0);

}

//---------------------------------

int start()

{

ObjectCreate("Label_1", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_1", Symbol(), LBL1_FontSize, LBL1_FontType, LBL1_FontColor);

ObjectSet("Label_1", OBJPROP_CORNER, Corner);

ObjectSet("Label_1", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_1", OBJPROP_YDISTANCE, Ypos);

ObjectCreate("Label_2", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_2", Rb_Size, LBL2_FontSize, LBL2_FontType, LBL2_FontColor);

ObjectSet("Label_2", OBJPROP_CORNER, Corner);

ObjectSet("Label_2", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_2", OBJPROP_YDISTANCE, Ypos+30);

if (FullVersion = true)

{

ObjectCreate("Label_3", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_3", "CONTRACT SIZE: "+Contract_Size, LBL3_FontSize, LBL3_FontType, LBL3_FontColor);

ObjectSet("Label_3", OBJPROP_CORNER, Corner);

ObjectSet("Label_3", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_3", OBJPROP_YDISTANCE, Ypos+80);

ObjectCreate("Label_4", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_4", "tick value: "+Tick_Value*Contract_Size+" "+Currency, LBL4_FontSize, LBL4_FontType, LBL4_FontColor);

ObjectSet("Label_4", OBJPROP_CORNER, Corner);

ObjectSet("Label_4", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_4", OBJPROP_YDISTANCE, Ypos+100);

ObjectCreate("Label_5", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_5", "margin: "+Margin*Contract_Size+" "+Currency, LBL5_FontSize, LBL5_FontType, LBL5_FontColor);

ObjectSet("Label_5", OBJPROP_CORNER, Corner);

ObjectSet("Label_5", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_5", OBJPROP_YDISTANCE, Ypos+112);

ObjectCreate("Label_6", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Label_6", "commissions: "+Commissions*Contract_Size+" "+Currency, LBL6_FontSize, LBL6_FontType, LBL6_FontColor);

ObjectSet("Label_6", OBJPROP_CORNER, Corner);

ObjectSet("Label_6", OBJPROP_XDISTANCE, Xpos);

ObjectSet("Label_6", OBJPROP_YDISTANCE, Ypos+124);

}

return(0);

}

//+------------------------------------------------------------------+

thefxpros

As far as I see you are doing it OK

The indicator will draw labels 3 to 6 only if FullVersion is set to true

 
thefxpros:
Hi, a question on the fly... i'm writing this simple indicator but i don't know yet how to use the "if" instruction. Could you give me the answer on this? Thanks

You shall write it either this way : if (FullVersion == true)or this way : if (FullVersion)

 
airquest:
You shall write it either this way : if (FullVersion == true)or this way : if (FullVersion)

Ooooops

Did not notice the if (FullVersion = true).

thefxpros, airquest is right : it must be "==" not "=" in the if condition

 

Why the maximum and minimum are not fixed automatically?intraday_intensityma.mq4

Files:
 
QuantF:
Why the maximum and minimum are not fixed automatically?intraday_intensityma.mq4

QuantF

Try it out now : intraday_intensityma_1.mq4

But also check the 55 line : if condition is not the same as the divisor

 
mladen:
QuantF

Try it out now : intraday_intensityma_1.mq4

But also check the 55 line : if condition is not the same as the divisor

Thank you!

Reason: