Email Account / All messages
Counting Partial Close for a trade
When you close a trade partial, you see it get a comment 'from # ticketnumber ' and in the order history it get the comment 'to # ticketnumber ' When i want to code 3 partial close areas for a trade, then i need to count how often i have already close partial from the first trade, but i am looking for a good logic way how to count how often i have already done partial close on that trade, in the order comment i can only check if i have make already once a partial close, if there is no comment which say 'from # ' then i know this trade have not been close partial, but how could i check if this trade have been close partial for example 2 or more often?Forum | 2023.10.23 14:45 | Email Account

Calculate risk based lotsizeForum | 2023.09.04 22:30 | Email Account
Calculate risk based lotsize
I have here a simple Lotsize calculation example, it does work when i write for example Stoplos=100 then it means 100 pips stoplos and i get a correct lotsize, but i want to change this calculation to use the ATR Indcator value instead of pips stoploss. But now the ATR value is maybe just 0.001 which is also 100 Pips but in the current calculation the lotsize will be to big. So i would like to have this calculation to work with ATR indicator stoploss value, how must i change the code to work with that?Forum | 2023.09.04 16:10 | Email Account

Calculate risk based lotsize
I have here a function which i find in this forum: now the stoploss pips which you write int this function is based on pips, but i want to know how i can change it to use ticks and how to get the ticks values correctly, if you for example have a 100 pips stoploss then you write 100 for input parameter to the function and you get the right lotsize but if you have for example bitcoin chart then the number 100 is to smal and not like 100 pips and the functions gives you a to big lotsize, i want to know how i can change this, i want to give the function something like the distance of ticks from stoploss price and current entry price, this distance give to the function instead of pips and then the function give me the lotsize, how can i change this function to work like that?Forum | 2023.09.03 09:13 | Email Account

What does symbol SUMMARY mean
I have in my Tradehistory some entrys where the symbol name is SUMMARY, you can see in the attached picture. I dont understand this, it looks like withdraw or deposit but the order type is show as and it have also lotsize of 0.01, you can see in the picture also there are normal withdraw or deposit entrys which have ordertype balance. I want to know how does it come the terminal write SUMMARY for this entrys and if this only happen in my current broker account or if this also can happen with other brokers, because i dont want to import this entrys to my database and i can write into my script if ordername is summary dont import it, but i dont know if other brokers will use the same ordersymbol name for this entrys, so i just dont understand why this happen, is this a bug?Forum | 2023.07.30 10:08 | Email Account

Are there Tips and Tricks to Avoid Overload in MetaTrader EAForum | 2023.07.09 19:35 | Email Account
Are there Tips and Tricks to Avoid Overload in MetaTrader EA
Thank you for your offer to help further. I will go back to working with onTimer events, and I hope that if the errors occur again where a timer stops working, I can somehow reproduce them and then post here so that we can find the reasons together. Because I remember last time, I would randomly encounter these problems, and I didn't exactly know why, making it difficult to conduct proper troubleshooting. Therefore, this time, I will observe it more closely for further analysis.Forum | 2023.07.09 19:13 | Email Account

Are there Tips and Tricks to Avoid Overload in MetaTrader EA
that was the problem that time, the Metatrader was not returning a error somehow but you could only read in the experts journal that the timer event did stop and so it was difficul to debug. is it possible to restart a timer event again from OnTick function when you know it has stop?Forum | 2023.07.09 17:01 | Email Account

Are there Tips and Tricks to Avoid Overload in MetaTrader EA
Yes, this is how my loop is looking: I am starting this while loop in the OnInit() function call, because i did had before some other problems when i was using the Metatrader Event Timer, that was stopping sometimes without notice, then people recommend to use a while loop and because the OnTick() function only run when new ticks come, the idea comeup for using the while loop, but which now creates sometimes this overload problems. Something like in Javascript try catch block could be usefull maybe for this while loop, but i dont have an idea how to build that in MQL.Forum | 2023.07.09 15:29 | Email Account
