Forum

MT5 - Locating the desired chart

When we open many charts (more than 30-40) in MT5 at once and running technical indicators with alerts, it is very difficult to locate the chart where the alert was generated. For an example, if the alert comes from AUDUSD, is there any way to open the AUDUSD with one click? If I click on "open

Missing alerts

When the indicator was running, it is observed that sometimes some of the alerts were missing. I ran the same indicator in 2 computers at the same time. Both setups were identical to each other. Surprisingly, the results were not the same. Some of the alerts were only displayed in one setup. Could

Stopping the indicator refresh with time frame change

Hi. Could someone please suggest a way to stop an indicator from refreshing when changing the time frame of the chart in MT5. Whenever I change the timeframe of the chart, it refresh the indicator and generate the same alert again and again. Please suggest a way to avoid this. Thank you

Run indicators without openning charts

Hi. Could someone please explain whether is it possible to run a custom indicator without opening a chart for the particular instrument in MT5? I read that maximum of 100 charts can be opened in MT5 in a given time. If we want to run an indicator in more than 100 instruments at the same time and

Script for opening charts for symbols in the Market watch

Hi I wanted a script to open charts for all the "Unhidden" symbols in the Market watch. With some help, I tried the following code. But it opens all the symbols in the Market watch including the hidden ones. Could someone please help to filter only the "Unhidden (Showing)" symbols in the Market

Clarification on "Logical OR"

if both conditions are true in a logical OR statement, what will be the outcome? Eg - if (A=1) then C=1 if (B=1) then C=1 so, accordingly, if (A=1) || (B=0) then C should be 1 if (A=0) || (B=1) then C should be 1 if (A=1) || (B=1) then what will be the C? is it still C=1 when both conditions are

Drawing a horizontal line across a given point in the chart

Hi.. I wanted to draw a horizontal line across the 50MA position at candle 1. I tried and now I know how to code for calculating the 50MA value at candle 1. If the 50MA value at candle 1 is "x", I want to draw a horizontal line across "x" in the chart. (It will be a dynamic line which changes its

Bollinger band value at nth candle

When I use the following code to read the bollinger band lower value at the past candle 1, it works fine. int handle; double lower_band[]; ArraySetAsSeries (lower_band,true); handle= iBands ( NULL , 0 , 20 , 0 , 2.0 , PRICE_CLOSE ); CopyBuffer (handle, 2 , 0 , 2 ,lower_band); Print (lower_band[ 1

Compare price value with the current MA value

Hi.. I want to execute a function if only the open value of the current candle is higher than the MA50. I applied the condition as follows. if((iMA(Symbol(),Period(),50,0,MODE_EMA,PRICE_CLOSE))<(iOpen(Symbol(),Period(),0))) When complied, it doesn't show any errors. But it's not working. Could

Run once per candle in MQL5

Hi.. I want a function to run only once at the beginning of each candle. One told me that the following code will do it in MQL4. if(IsNewCandle()) { //---Here comes the function which needs to run only at the beginning of each candle---// } bool IsNewCandle() { static datetime