Forum

How does MT5 handle the Chart ID?

I searched everywhere in the documentation but didn't find a clear information about this: How does Metatrader 5 exactly handle the Chart ID? Are they numbered from 0 to 999? and what happens with the ID of chart number 1 if I close the chart number 0? does the chart 1 turn in to 0? And what is

Sleep() within a while() Loop

Why is the sleep function not working properly within a while loop? bool loaded = false ; while (!loaded) { if ( CopyTime (BCIndex, PERIOD_CURRENT , time[start_pos - 1 ], time[rates_total - 1 ], BCtime) != - 1 && CopyTime (PCIndex, PERIOD_CURRENT , time[start_pos - 1 ], time[rates_total - 1

Apply custom Indicator on a (virtual) custom Chart

Hi Guys I wanna make inside my own custom indicator some modifications to the existing chart & period data, and save the results in my own series arrays (let's say: cust_open[], cust_close[], cust_high[], cust_low[], cust_time[], cust_tick_volume[], cust_volume[], cust_spread[]). so it's technically

Indicator not plotting!

Hey guys, I wrote a simple indicator that plots "Sections" on the chart. i checked that the buffer arrays are filled correctly, but it is still not plotting the lines. I tried everything, and now simplified the code as simple as possible, still not plotting: #property indicator_chart_window

connection to XXX lost - unable to login

Dear all I have a really strange problem. After renting a new dedicated baremetal server I tried to login to my MT5 accounts but I am getting following error: 2261552: CONNECTION TO FXOPEN-MT5 LOST it happens immediately when trying to login to all different mt5 servers and all accounts I have. no