Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 299

 
Vitaly Muzichenko:

Move the opening permission to if

or reread it.

There are several variants.


Please explain: in case I write this condition at the beginning of code, what algorithm reads further - all conditions are fulfilled further + graphic mapping starts, right? Then it reads again or keeps in memory? It turns out that if the condition is fulfilled once, the chart is launched, and then the condition works to open trades. This is how it should be, the question is, have I got it right?

 
Tigerfreerun:

Please clarify: in case I write this condition at the beginning of the code, what read algorithm goes on - all conditions are fulfilled further + the graphical mapping is started, right? Then it reads again or holds in memory? It turns out that if the condition is fulfilled once, the chart is launched, and then the condition works to open trades. This is how it should be. The question is, have I got it right?

Explain your problem more clearly, and if it's not a secret code, please post it

 

Hello. Can you please tell me how to skip 50 candles on the chart?

t=iTime(NULL,0,i+1);
if(iBarShift(NULL,0,t)>50)

This option works, but only in the future. On the history it doesn't skip those 50 candles.

 
buyanov:

in addition, there is also a warning before the text

" implicit cjnvertion from 'string' to 'number'

Not an error, of course, but unpleasant, too!





Let's see all the code

 

I give you all the code

//---------------------------------------------------------------------------------------------------------------------------
  void OnTick()
 { 
 //********************************* 
    Alert("beg OnTick");
    FastMA=NormalizeDouble(iMA(NULL,0,Period_FastMA,0,MODE_SMA,PRICE_CLOSE,1),Digits());//Period_FastMA=4
    SlowMA=NormalizeDouble(iMA(NULL,0,Period_SlowMA,0,MODE_SMA,PRICE_CLOSE,1),Digits());//Period_SlowMA=8
    GetNext(NextTick);
    Alert(NextTick);
    Alert("NextTick=",NextTick);
    Delta=NormalizeDouble(FastMA-SlowMA,Digits());
    Alert(Delta,Digits());
    Alert("FastMA=",DoubleToStr(FastMA ,Digits()),"SlowMA=",DoubleToStr(SlowMA,Digits()), "Delta=",DoubleToStr(Delta,Digits()));
  //----------------------------------------------------------------------------------------------------------------------------  
 }// end Alert(end OnTick)
 

Please give me a hint,

how to find your profile in mql4. i want to ask a question to the developers

 
buyanov:

Please give me a hint,

how to find your profile in mql4. i want to ask a question to the developers

All mql4 profiles have been moved to mql5.

 
buyanov:

Here is all the code

...

Insert the code using the SRC button - eyes up on the new post menu please.

I've already pasted yours properly.

 

Thank you,Artyom Trishkin.



 

But nothing has changed.

Both the error and the warning remain.

Reason: