Forex
Google

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-25-2006, 10:54 PM
Aaragorn's Avatar
Aaragorn Aaragorn is offline
Senior Member
 
Join Date: Jun 2006
Location: USA
Posts: 801
Aaragorn is on a distinguished road
Does the print function give anyone else this kind of trouble too?

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???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-26-2006, 03:09 PM
Aaragorn's Avatar
Aaragorn Aaragorn is offline
Senior Member
 
Join Date: Jun 2006
Location: USA
Posts: 801
Aaragorn is on a distinguished road
This Is Absurd!!!

I have this little code snippet...

PHP Code:
for (int m 0<= MaxOpenTrade++){
            if(
CountTrades() < MaxOpenTrade)
   if(
highMatches == && lowMatches == 0){
       Print(
"NO MATCHES before order");
        
//TradeSignal = 99; 
        
}else{ 
          Print(
"MATCHES FOUND before order");
          
//TradeSignal = 1;
        
continue; 
it produces these journal entries....

PHP Code:
2006.07.26 08:57:41    2005.03.15 05:14  GoGetShorts-2.21x GBPUSD,M30AFTER ORDER Number:7     high matches:1  low matches:0
2006.07.26 08
:57:41    2005.03.15 05:14  GoGetShorts-2.21x GBPUSD,M30SELL order opened ticket number7  for  1.9137
2006.07.26 08
:57:41    2005.03.15 05:14  GoGetShorts-2.21x GBPUSD,M30open #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,M30MATCHES FOUND before order
2006.07.26 08
:57:41    2005.03.15 05:14  GoGetShorts-2.21x GBPUSD,M30MATCHES FOUND before order
2006.07.26 08
:57:41    2005.03.14 14:49  GoGetShorts-2.21x GBPUSD,M30AFTER ORDER Number:6     high matches:0  low matches:0
2006.07.26 08
:57:41    2005.03.14 14:49  GoGetShorts-2.21x GBPUSD,M30SELL order opened ticket number6  for  1.9114
2006.07.26 08
:57:41    2005.03.14 14:49  GoGetShorts-2.21x GBPUSD,M30open #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,M30NO MATCHES before order
2006.07.26 08
:57:41    2005.03.14 14:49  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 08
:57:41    2005.03.14 14:49  Testertake profit #5 at 1.9117 (1.9114 / 1.9116)
2006.07.26 08:57:40    2005.03.14 06:30  GoGetShorts-2.21x GBPUSD,M30AFTER ORDER Number:5     high matches:0  low matches:0
2006.07.26 08
:57:40    2005.03.14 06:30  GoGetShorts-2.21x GBPUSD,M30SELL order opened ticket number5  for  1.9222
2006.07.26 08
:57:40    2005.03.14 06:30  GoGetShorts-2.21x GBPUSD,M30open #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,M30NO MATCHES before order
2006.07.26 08
:57:40    2005.03.14 06:30  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 08
:57:40    2005.03.10 20:30  GoGetShorts-2.21x GBPUSD,M30AFTER ORDER Number:4     high matches:0  low matches:0
2006.07.26 08
:57:40    2005.03.10 20:30  GoGetShorts-2.21x GBPUSD,M30SELL order opened ticket number4  for  1.9219
2006.07.26 08
:57:40    2005.03.10 20:30  GoGetShorts-2.21x GBPUSD,M30open #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,M30NO MATCHES before order
2006.07.26 08
:57:40    2005.03.10 20:30  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 08
:57:39    2005.03.07 18:00  GoGetShorts-2.21x GBPUSD,M30AFTER ORDER Number:3     high matches:1  low matches:1
2006.07.26 08
:57:39    2005.03.07 18:00  GoGetShorts-2.21x GBPUSD,M30SELL order opened ticket number3  for  1.914
2006.07.26 08
:57:39    2005.03.07 18:00  GoGetShorts-2.21x GBPUSD,M30open #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,M30MATCHES FOUND before order
2006.07.26 08
:57:39    2005.03.07 18:00  GoGetShorts-2.21x GBPUSD,M30MATCHES FOUND before order
2006.07.26 08
:57:39    2005.03.07 14:30  GoGetShorts-2.21x GBPUSD,M30AFTER ORDER Number:2     high matches:0  low matches:0
2006.07.26 08
:57:39    2005.03.07 14:30  GoGetShorts-2.21x GBPUSD,M30SELL order opened ticket number2  for  1.9125
2006.07.26 08
:57:39    2005.03.07 14:30  GoGetShorts-2.21x GBPUSD,M30open #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,M30NO MATCHES before order
2006.07.26 08
:57:39    2005.03.07 14:30  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order 
which show that it's working perfectly as intended....

EXCEPT!!!

change it include asking it to modify a variable....

PHP Code:
for (int m 0<= MaxOpenTrade++){
            if(
CountTrades() < MaxOpenTrade)
   if(
highMatches == && lowMatches == 0){
       Print(
"NO MATCHES before order");
        
TradeSignal 99
        }else{ 
          Print(
"MATCHES FOUND before order");
          
TradeSignal 1;
        continue; 
now it blows apart....

PHP Code:
2006.07.26 09:05:19    2005.03.28 15:27  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:27  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:27  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:27  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:27  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:27  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:26  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:26  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:26  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:26  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:13  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:13  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:13  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:13  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:13  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:13  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:13  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:13  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:13  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:13  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:13  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:13  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:12  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:12  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:12  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:12  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:12  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:12  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order
2006.07.26 09
:05:19    2005.03.28 15:12  GoGetShorts-2.21x GBPUSD,M30NO MATCHES before order 
so why will it print journal entries perfectly and yet not modify a variable????

Last edited by Aaragorn : 07-26-2006 at 03:12 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-26-2006, 04:49 PM
Aaragorn's Avatar
Aaragorn Aaragorn is offline
Senior Member
 
Join Date: Jun 2006
Location: USA
Posts: 801
Aaragorn is on a distinguished road
Is there a debugger for this?

I don't know how to approach this? Is there a debugger for mql4?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to export and print a statement on MT4? Dance With Lions Metatrader 4 2 01-19-2007 11:46 PM
How print a journal by symbol ? Jovager Expert Advisors - Metatrader 4 0 11-12-2006 10:13 AM
Does somebody have this kind of indicator? Marbo Metatrader 4 1 07-02-2006 10:40 PM


All times are GMT. The time now is 09:19 AM.