Forum

Getting Error 131, Invalid trading volume no matter what the lot size is (EA)

Hello Everyone, I am coding an EA, this EA had a calculating lot size function, when trying to backtest my EA my order was rejected and got error 131 Invalid trade volume , when I checked what were the trading volumes that the EA used there was nothing strange 0.1 or 0.01 or so, nothing particular

Function not working well

Hello Everyone, I hope you are all well, I was trying to create a function on MQL4 that would tell me what day of the week is and this is what I came up with: Sadly, it only returns Monday even if I feed it the day because I am was going to use it with the function DayofWeek(). If anyone knows why