Forum

split up lot

Hello I'm facing a problem, and I need some help. I'm trying to code this feature: "Split up trade into X smaller trades " i.e the user can set 1 standart lot and set 5 to this parameter. (In this case, the ea should open 5 trades with 0.20 lot size) This the code i wrote void getSplittedVolume(

Custom timeframe in MT5

Hi everyone, I'm trying to display a chart in M18. This timeframe is not native in MT5. I made some search on the forum and they all talk about custom symbols (at least the ones I read) so I tried to do a custom symbol using this page

Trailing stop in percentage instead of pips

Hi everybody I would like to code a trailing stop in percentage instead of pips Usually this is what i' am doing input int InpTrailStop = 15 ; // Trail Stop (pips) input int InpTrailStep = 2 ; // TrailStep (pips) // in init section ExtTrailStop = InpTrailStop * m_adjusted_point; ExtTrailStep =

Pass more than 60 parameters to iCustom

Hi, I've got an indicator I bought in the market that has too many parameters to be called by iCustom function in my EA This is the code I used iCustom ( Symbol (), Period (), indicatorName, ""

Read a csv file from the strategy tester

Hello, I'm trying to read a value from a csv file. Everything works fine when I attach the EA on a chart. The problem is only with the strategy tester . As per the documentation : The file is opened in the folder of the cli ent terminal in the subfolder MQL5\files (or

Trade history MQL4 vs MQl5

Hello everyone, I'm trying to convert some part of my MQL4 code to MQL5 code. After reading the documentation, I still have trouble understanding some things. Can you tell if the following code do the same things MQL4 version: void historyMQL4(){ for ( int z=OrdersHistoryTotal(); z>= 0 ; z--) {

Help with renko maker confirm indicator

Hello, I'm using renko maker confirm indicator and I'm trying to make an EA. The basic rule is BUY when color of indicator = Lime and SELL when color of indicator = red I want to check the color of renkomaker_confirm indicator with iCustom but I don't know which buffer number to use. I don't want

Detect order close manually

Hi everyone, I'm trying to detect an order opened by my EA and closed manually. I tried with magic number but, unfortunately, get only 0 for manually closed orders. Anyone know how to reliable detect an order opened by an EA and closed manually ? Thank you

Customize strategy tester display

Hi everybody, I tries to figure out how can I remove the two lines on the strategy tester (see on picture) Someone can help me please

Arrow does not display

Hi everybody, I'm learning MQL5 coding and now I'm trying to add arrows to an indicator. I used this code #property indicator_chart_window #property indicator_buffers 4 #property indicator_plots 3 //--- Line #property indicator_label1 "MA" #property indicator_type1 DRAW_COLOR_LINE #property