Questions from Beginners MQL5 MT5 MetaTrader 5 - page 639

 
-Aleks-:

Then everything is clear. Mach on the zero bar is constantly recalculating - so the signals will come at every tick.

Try it this way:

static datetime TimeN=0;

int Signal=0;


int init()

  {

   return(0);

  }

start()

  {

//Операции выполняются только при появлении следующего бара

   datetime TimeC=iTime(NULL,TF,0);

   if(TimeN==0)TimeN=TimeC;

   if(TimeN==TimeC && Signal==1) return;

   TimeN=TimeC;

   Signal=0;


//-----------------------------------------------------------------------------------------------------

// Сигналы

//-----------------------------------------------------------------------------------------------------

if(Open[1]>ma && Close[1]<ma)  

{

bool res = SendMail("Сигнал", " Покупай");

Signal=1;

}

if(Open[1]<ma && Close[1]>ma) 

{

SendMail("Сигнал", "Продавай");

Signal=1;

}

   return(0);

  }


In general, usually do a comparison

ma=iMA(NULL,0,MovingPeriod,MovingShift,MODE_SMA,PRICE_CLOSE,1);

ma>Open[0];


Thank you so much! Finally works as it should)))
 
ev85:
Thank you so much! Finally works as it should))
You're welcome. Just note that two signals - buy and sell - will not come at once - the first signal will override the second.
 
Good afternoon. Question from a dummy. I bought an Expert Advisor, everything is fine, everything works, I am happy with everything. Then Windows updates and tears down the Expert Advisor and all the settings to hell (and this happens). Can anyone help suggest how it can be re-activated without re-payment? The only thing I see on the EA page is an offer for a new purchase and that I have 4 out of 5 activations left, but no description of how to reactivate it. Thank you
 
apopy:
Hello. Question from a Dummie. I have purchased an Expert Advisor, everything is fine, it all works, I am satisfied with everything. I have not tried it and I do not want to buy it for a long time. Can anyone help suggest how it can be re-activated without re-payment? The only thing I see on the EA page is an offer for a new purchase and that I have 4 out of 5 activations left, but no description of how to reactivate it. Thank you

if there are 4 out of 5 activations left, then there are 4 activations left. By the way - you should not lose your activation when you upgrade, you should write to servicedesk.

It's easy to activate:

go to terminal - enter settings - community your username and password, then in terminal - Market tab - Purchased - Install.

 

Question for connoisseurs)

I searched for an option in MetaEditor, but couldn't find it: How to make it so that when you highlight any word all occurrences throughout the document will be highlighted? Just how uncomfortable without highlighting.

For clarity, I'm attaching an image:


 
Vitaly Muzichenko:

Question for connoisseurs)

I searched for an option in MetaEditor, but couldn't find it: How to make it so that when you highlight any word all occurrences throughout the document will be highlighted? Just how uncomfortable without highlighting.

For clarity, I'm attaching an image:


It's very hard to find a black cat in a dark room...

Especially if it's not there.

 
Vitaly Muzichenko:


I searched for an option in MetaEditor, but couldn't find it: How can I make it so that when any word is highlighted, all occurrences throughout the document are highlighted?

Look for folding ))
 
o_O:
You should also look for folding ))

What is folding and what is it for?)

Seriously though, I asked it for a reason, I was hoping I hadn't learned to use ME fully in a few years. Too bad there's no such simple and handy thing(

 
Can I leave an opinion about the DC on my newsfeed or blog?
 
Vitaly Muzichenko:

What is folding and what is it for?)

Seriously though, I asked it for a reason, I was hoping I hadn't learned how to use ME fully in a few years. It's a pity there's not such a simple and handy thing(

ME turned out to be of no use to anyone, apparently did not shoot for MQ)).

Now all efforts are thrown to create a clone of R ))).

So I will have to code wherever it is more convenient))

The attached file contains MQL4 (classic) for Notepad++, MQL5 is still in production.

I think you are a developer too, and you're asking questions in the newbies branch ))
Files:
MQL4-Notepad.zip  1377 kb
Reason: