Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 821

 
starikov_d_v:
Can someone please advise if in MQL4 one can see how the code is executed line by line or sequentially? I know that such feature is available in Delphi and it is very handy, but I can't find it here :(
Insert/Remove breakpoint - F9, debugging - F5, probably, it is the only thing.
 
Nope, not that one :(, well, we'll do something else, thanks
 

Question about code....

for (z=i+10; z>=i; z--){
 if(Close[z+1]<Close[z+3]) {num=num+1;
         
                           } else  {num=0;}
 }

How to make the loop be executed as long as the variable num????

Do you have any ideas?

 
Hello, I wrote an Expert Advisor that works fully automatically by the Martingale method. it works simultaneously on many currency pairs and buys where there is a likely pullback. for a month, it worked well and gave profits. but when the currency gbp chf collapsed on the 15th it lost about half of the money until the protection against losses. the question is, I want to add a check on market instability. i want to check if i got a signal from open price to high/low price and i dont want to buy when market volatility reoccurs i can block it, when candlestick length exceeds certain amount of ticks, but how to enable it?
 
nikelodeon:

Question about code....

How to make the loop be executed as long as the variable num????

Do you have any ideas?

Probably

for (z=num; z>=0; z--){
 if(Close[z+1]<Close[z+3]) {num=num+1;
         
                           } else  {num=0;}
 }
 

Hi all. Please give me a link where to read how to write the divergence function and how to hide the Expert Advisor code, or can someone share the ready-made one? I can't find it.

 
pycha:
Hello, I wrote an Expert Advisor that works fully automatically by the Martingale method. it works simultaneously on many currency pairs and buys where there is a likely pullback. for a month, it worked well and gave profits. but when the currency gbp chf collapsed on the 15th it lost about half of the money until the protection against losses. the question is, I want to add a check on market instability. I want to check if i got a good trade signal from open price to high/low price and i don't want to trade more than tixix, but how to enable it?
You could play around with the allowable spread value.
 
evillive:

Probably

This will not work, because initially num is zero, so the cycle will not be done......

This is it, it seems like a simple task, but how to solve?????

 
Veterros:

Hi all. Please give me a link where to read how to write the divergence function and how to hide the Expert Advisor code, or can someone share the ready-made one? I can't find it.

fedor9932:


If you need help, here is the indicator for divergence in stochastics, look at the code and maybe it will help.

 
nikelodeon:

Question about code....

How to make the loop be executed as long as the variable num????

Do you have any ideas?

so num changes while the loop is executing. which value should be taken for the number of times the loop repeats?
Reason: