MQL4 warnings: Expression has no effect

TomDominic

Trader
Apr 30, 2023
40
1
14
26
Kenya
helloo,,, i still have some warnings in my code .

expression has no effect . 3 of them .
What about it and how can i solve it please ?
 

hayseed

Master Trader
Jul 27, 2010
1,046
262
149
usa
i have but iam not figurring out the mistake,,,

the line is

Open [0]; and
Bid;
what could be the mistake here,,,,,?
//-----

need to see the line exactly as it written......

Open [0]; and
Bid;


that does not mean anything..... open[0] is just a value..... Bid is just a value...... you must do something with them......

Open [0] > Open [1]; //--- that means this open is greater than prior open......

and..... are you using and..... if so use &&......

Bid > Close[1]; //---- means bid greater than prior close......

you must assign them to something, or compare them to something.....

otherwise like the warning said, they have no effect......

always best if we can see the exact lines of code......h
 
  • 👍
Reactions: TomDominic

TomDominic

Trader
Apr 30, 2023
40
1
14
26
Kenya
//-----

need to see the line exactly as it written......

Open [0]; and
Bid;

that does not mean anything..... open[0] is just a value..... Bid is just a value...... you must do something with them......

Open [0] > Open [1]; //--- that means this open is greater than prior open......

and..... are you using and..... if so use &&......

Bid > Close[1]; //---- means bid greater than prior close......

you must assign them to something, or compare them to something.....

otherwise like the warning said, they have no effect......

always best if we can see the exact lines of code......h
thanks alot buddy