This Is Absurd!!!
I have this little code snippet...
if(CountTrades() < MaxOpenTrade)
if(highMatches == 0 && lowMatches == 0){
Print("NO MATCHES before order");
//TradeSignal = 99;
}else{
Print("MATCHES FOUND before order");
//TradeSignal = 1;
continue;
[/PHP]
it produces these journal entries....
2006.07.26 08:57:41 2005.03.15 05:14 GoGetShorts-2.21x GBPUSD,M30: SELL order opened ticket number: 7 for 1.9137
2006.07.26 08:57:41 2005.03.15 05:14 GoGetShorts-2.21x GBPUSD,M30: open #7 sell 0.05 GBPUSD at 1.9137 sl: 1.9184 tp: 1.9032 ok
2006.07.26 08:57:41 2005.03.15 05:14 GoGetShorts-2.21x GBPUSD,M30: MATCHES FOUND before order
2006.07.26 08:57:41 2005.03.15 05:14 GoGetShorts-2.21x GBPUSD,M30: MATCHES FOUND before order
2006.07.26 08:57:41 2005.03.14 14:49 GoGetShorts-2.21x GBPUSD,M30: AFTER ORDER Number:6 high matches:0 low matches:0
2006.07.26 08:57:41 2005.03.14 14:49 GoGetShorts-2.21x GBPUSD,M30: SELL order opened ticket number: 6 for 1.9114
2006.07.26 08:57:41 2005.03.14 14:49 GoGetShorts-2.21x GBPUSD,M30: open #6 sell 0.05 GBPUSD at 1.9114 sl: 1.9161 tp: 1.9009 ok
2006.07.26 08:57:41 2005.03.14 14:49 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 08:57:41 2005.03.14 14:49 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 08:57:41 2005.03.14 14:49 Tester: take profit #5 at 1.9117 (1.9114 / 1.9116)
2006.07.26 08:57:40 2005.03.14 06:30 GoGetShorts-2.21x GBPUSD,M30: AFTER ORDER Number:5 high matches:0 low matches:0
2006.07.26 08:57:40 2005.03.14 06:30 GoGetShorts-2.21x GBPUSD,M30: SELL order opened ticket number: 5 for 1.9222
2006.07.26 08:57:40 2005.03.14 06:30 GoGetShorts-2.21x GBPUSD,M30: open #5 sell 0.05 GBPUSD at 1.9222 sl: 1.9269 tp: 1.9117 ok
2006.07.26 08:57:40 2005.03.14 06:30 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 08:57:40 2005.03.14 06:30 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 08:57:40 2005.03.10 20:30 GoGetShorts-2.21x GBPUSD,M30: AFTER ORDER Number:4 high matches:0 low matches:0
2006.07.26 08:57:40 2005.03.10 20:30 GoGetShorts-2.21x GBPUSD,M30: SELL order opened ticket number: 4 for 1.9219
2006.07.26 08:57:40 2005.03.10 20:30 GoGetShorts-2.21x GBPUSD,M30: open #4 sell 0.05 GBPUSD at 1.9219 sl: 1.9266 tp: 1.9114 ok
2006.07.26 08:57:40 2005.03.10 20:30 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 08:57:40 2005.03.10 20:30 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 08:57:39 2005.03.07 18:00 GoGetShorts-2.21x GBPUSD,M30: AFTER ORDER Number:3 high matches:1 low matches:1
2006.07.26 08:57:39 2005.03.07 18:00 GoGetShorts-2.21x GBPUSD,M30: SELL order opened ticket number: 3 for 1.914
2006.07.26 08:57:39 2005.03.07 18:00 GoGetShorts-2.21x GBPUSD,M30: open #3 sell 0.05 GBPUSD at 1.9140 sl: 1.9187 tp: 1.9035 ok
2006.07.26 08:57:39 2005.03.07 18:00 GoGetShorts-2.21x GBPUSD,M30: MATCHES FOUND before order
2006.07.26 08:57:39 2005.03.07 18:00 GoGetShorts-2.21x GBPUSD,M30: MATCHES FOUND before order
2006.07.26 08:57:39 2005.03.07 14:30 GoGetShorts-2.21x GBPUSD,M30: AFTER ORDER Number:2 high matches:0 low matches:0
2006.07.26 08:57:39 2005.03.07 14:30 GoGetShorts-2.21x GBPUSD,M30: SELL order opened ticket number: 2 for 1.9125
2006.07.26 08:57:39 2005.03.07 14:30 GoGetShorts-2.21x GBPUSD,M30: open #2 sell 0.05 GBPUSD at 1.9125 sl: 1.9172 tp: 1.9020 ok
2006.07.26 08:57:39 2005.03.07 14:30 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 08:57:39 2005.03.07 14:30 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
[/PHP]
which show that it's working perfectly as intended....
EXCEPT!!!
change it include asking it to modify a variable....
[PHP]for (int m = 0; m <= MaxOpenTrade; m ++){
if(CountTrades() < MaxOpenTrade)
if(highMatches == 0 && lowMatches == 0){
Print("NO MATCHES before order");
TradeSignal = 99;
}else{
Print("MATCHES FOUND before order");
TradeSignal = 1;
continue;now it blows apart....
[PHP]2006.07.26 09:05:19 2005.03.28 15:27 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:27 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:27 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:27 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:27 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:27 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:26 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:26 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:26 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:26 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:13 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:13 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:13 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:13 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:13 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:13 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:13 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:13 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:13 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:13 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:13 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:13 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:12 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:12 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:12 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:12 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:12 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:12 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
2006.07.26 09:05:19 2005.03.28 15:12 GoGetShorts-2.21x GBPUSD,M30: NO MATCHES before order
so why will it print journal entries perfectly and yet not modify a variable????
Is there a debugger for this?
I don't know how to approach this? Is there a debugger for mql4?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have a couple print lines....
Print(" index value high:",sLocatorHighs[p]," P is:",p," high matches:",highMatches," High is:",HIGH," index value low:",sLocatorLows[p]," P is:",p," low matches:",lowMatches," Low is:",LOW);
and it will print ok unless I ask it to print the same line in two places in the code....
OR
if I ask it to print
Print("one");
Print("two");
Print(three");
in place of the first line then it prints these three lines and nothing else...
it's not printing all the print lines in the code...any ideas why?
but when I turn these earlier print lines off with // then it prints the later print lines just fine???