I'll be putting my EA on several pairs at the same time which is something I'm doing for the first time. Usually with one pair its quite easy to manage using a check for PositionsTotal () Now I want to make sure that not more than one trade is
I know that alert sounds can be manually enabled and disabled through Tools>Options>Events in mt5. I am trying to figure out how I can play alert sounds only when specific conditions have been met. In all other cases alarm sounds
I use the following code to draw a rectangle from one candle to another. bool drawRectangle( int candleInt, const double top, const double bottom, ENUM_TIMEFRAMES cDuration, color rectColor) { bool checkBarCount = true
I am trying to find all consecutive timeframe pairs (for timeframes from M2 to H1) that preserve a candlestick’s upper wick for the duration of a week and keep updating the pairs regions drawn every 5 minutes. A rectangle will be drawn for the wick
Generally I know how to search for a pattern in lower timeframes between two datetime values. I need to do something a bit different now. How can I search within for patterns on lower timeframes within one candle? For example, say, I have an H1
From the image, I’ve marked the high of candle index (i) and low of candle index (i + 1). These candles are on the H1 chart. How can I search multiple lower timeframes within the two H1 candles to determine if there are similar consecutive candles
I am writing an EA that uses crossing moving averages . I tell the crossing of moving averages in the following way: // if shift5MA > shift0MA if (shift5MAArray[ 1 ] > shift0MAArray[ 1 ]) {
I have an indicator that draws arrows on the chart as seen in the image below: I tried searching for the arrow objects in ' Object List' but there were no objects there. I also checked ' Object List>List All' menu. I
I found the indicator MS-Candle-Index ( https://www.mql5.com/ru/code/24254 please refer to the fixed SmoothAlgorithms.mqh at https://www.mql5.com/en/forum/321609 ). How I can use the indicator to access the strength value of the last
My code below draws a rectangle based on certain conditions. I want to add another condition for drawing the rectangle. The rectangle is drawn from the open to the high of a bullish candle with index (i+1) as shown in the code. How can I tell if
I found this candlestick strength indicator ( https://www.mql5.com/ru/code/24254 ). It has several errors (please see screenshots below), so I left a comment for the author but haven't heard from him. How can I get this errors resolved
I have an EA that draws rectangle on a specifically defined bearish pinbar followed by a bullish candle. Please see the code below. It basically shows the rectangle on the timeframe displayed on the chart. How can I search for this candlestick
I would like to know how I can find the number of pips between two values. For example, as shown below, if the difference between to values is greater than 20 pips: if ( iClose ( _Symbol , 0 , 1 ) - iOpen ( _Symbol , 0 , 3 ) > 20
I have the error "Not all control paths return a value". I've seen it before and have been able to resolve it for a simple bool return value. This is a bit different and seems to be a challenge for me since it has a for-loop and at the same
I am using the following code to draw an arrow, how can I tell which candle the arrow object is drawn on? void OnTick () { for ( int i = 0 ; i < ObjectsTotal (); i++){
I know how to draw an object arrow on the chart, which I usually do like this: ObjectCreate ( 0 , "prevHigh" , OBJ_ARROW_DOWN , 0 ,Time[ 0 ],High[highestCandle]);
I have written some code that uses CTrade to open a buy or sell trade (only one trade for now). I want to know the type of trade before I close it and from what I've read it seems I should be using CPositionInfo to determine whether it's a buy or
I would be very grateful if someone could help me with converting the RSI and MACD below to mql5. I have seen an article on the forum on converting mql4 code to mql5 which has helped me in some other cases but I don't seem to get how to do it for the
I tried to change the Fibonacci display color but it only changes the color of the diagonal line across the levels as in the image below. How can I change the level colors ? Please see my relevant code below