[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 335

 
CLAIN:
..... I want my EA to stop trading when I get a loss 3 times in a row ...


1. I can advise to consult the classics)) :

NumberOfLossPosToday() function.

https://www.mql5.com/ru/forum/107476/page24

PS. Shit, how to copy the link to a particular post on this forum ?????

2. Or, another way - control your loss.

Or - exit when lot size is exceeded.

 
n-i-k:


I can advise to refer to the classics)) :

NumberOfLossPosToday() function.

https://www.mql5.com/ru/forum/107476/page24

PS Man, how to copy the link to a particular post on this forum ?????

NumberOfLossPosToday - Returns the number of losing positions closed today.
 

>
 
How do I know what are the minimum stoplost and takeprofit I can set in the order at the moment? (Because sometimes they change, at least 30, then 31, then 40... "NormalizeDouble(Bid-40*Point,Digits)")
 

https://docs.mql4.com/ru/common/MarketInfo

h ttps://docs.mql4.com/ru/constants/marketinfo

MODE_STOPLEVEL14Minimum allowable stop loss/stake profit level in pips
 

-F1- thank you.

 
Good afternoon to all! I can't decide how to make it better, so I'm asking for advice from professionals. The A function performs some calculations which result in several hundred values of double type. The B function also performs some calculations resulting in several hundred values of double type. The C function processes the results of the data received from A and B functions and the result will be logical TRUE or FALSE. After that, the data from functions A and B are no longer needed. The question is how to organize arrays better, because if we declare all arrays at global level, it will take too much memory, and considering that the EA will work on VPS and will be installed on each of 12 pairs, it will be a very unproductive waste of memory. If only it were possible to delete arrays after they are no longer needed, but how to do it, especially from the global level?
 
Elenn:

there is an ArrayResize function. But you have to estimate the speed of execution you need. You will have to choose - either memory consumption but fast execution speed or memory control but slow.

 
sergeev:

there is an ArrayResize function. But you have to estimate the speed of execution you need. You will have to choose - either memory consumption but fast execution speed or memory control but slow.


Thanks for the idea.
 
sanches83:
Can you please tell me if it is possible to run a macro from MQL in an EXCEL book (it is open)?

Please excuse my insistence, I just wanted to know if it's really not possible, or if it's just a lost cause.