Forum

Using EA on VPS

Hey guys Please can anyone show me how to setup an EA on VPS? I rented a VPS and want to put an Alerter EA on it so that it can send me notifications even if my pc isn’t running I tried it by myself but it didn’t work. The EA worked smoothly when I was on MetaTrader, but when i closed MetaTrader it

Error 4022 mql5

Hey guys, so i coded an indicator and everything is ok but when i switch timeframes sometimes the uninitialize reason which i print to observe is 3 which is normal meaning REASON_CHARTCHANGE but other times it’s reason 1 meaning REASON_REMOVE but the indicator doesn’t remove. I tried to catch the

Dealing with multiple objects on MQL5 efficiently

Hey, Please, i coded and indicator and everything is okey and fine but it creates multiple objects and in the code i try to loop through them and it works fine. But if i load with other indicatos that themselves also creates multiple objects, the number of objects increase on the chart and when

Line indicator that change color with each new candle on MT4

Hey guys, so i did research on how to accomplish this and saw some posts in the forum but for the case where color changes with each candle no line appear I guess it's because I set 2 buffers with different colors. even indices are filled in one buffer and od buffers are filled in one. In data

Issue with strategy tester

Hey guys, I have been encountering an issue with the strategy tester on MT5 since some time. I used it before to run tests and everything worked perfectly until yesterday I launched a backtest and it kept getting stuck at the stage of loading data. I will show you a picture of what the Journal is

chart event chart change bugging

Hey guys So I was coding something and needed to use the OnChartEvent function to detect timeframe change, so in the documentation they said to use the CHARTEVENT_CHART_CHANGE as id which i did now the code works just that i don't why it gets executed 2 times instead of once. Maybe I don't

MQL5 position commission retrieving

Hey guys, looked at the documentation about the CPositionInfo class which seems to have a Commission() function to retrieve commission but maybe I use it wrongly is there someone who can show me the proper way of using it? A sample code would be appreciated. Thanks

Mql5 price[ ] ?

Hey guys, I looked at the mql5 code of the rsi which I want to modify a bit. The OnCalculate function there have this in parameters const … price[] and inside the OnCalc function I see that array used but I don’t know exactly what it returns and want to know what it returns exactly. Sorry for not

Global variables issue mql5

Hey guys, I coded something and had to use global variables because when I switched timeframes the program re initialized and all as it does and I needed some variables to not lose their values when reinitialized. I am not talking about global variables in termes of scope but global variables like

MQL 5 Deinit not working

Hey guys, so I am experimenting MQL5 and I saw there is no more Deinit by default so you have to add it. I made a quick test of an indicator that display an object at OnInit but I want it to be removed when I remove the indicator so ObjectDelete. I added a OnDeinit func and put the ObjectDelete