Forum

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

Data recording in Strategy tester

Hey guys, I plan on coding an EA that will not only run but gather specific datas in the mean time and write them into a txt file Now I would like to know if when running it in the strategy tester , the writing on file operations are still going to work or strategy tester only deal with the

Overlay chart indicator with button to switch between line chart and bar chart

Hey guys, I have the sbt indicators that help for overlaying charts on another one. I have one for the line chart and one for candle chart. I know there is a way to put them together in one indicator so that when clicking a button for line it launches the line chart version and then when clicking

Program not updating as it is supposed to

Hey guys So I coded a program that will look for all the rectangles on chart then change the color based on certain conditions. Now the problem I'm encountering is that when for example I draw one rectangle even if the condition is met the color don't change but as soon as I create a new rectangle