Jackery
Jackery
Jackery
Added topic How to make ensure that not more than one trade is taken per pair when multiple pairs are traded
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
Jackery
Added topic How can I programmatically enable and disable sounds for alerts
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
Jackery
Added topic How to extend rectangle till price passes both lower and upper values
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
Jackery
Added topic How can I set CopyRates for timeframe array elements
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
Jackery
Added topic How to search for candle patterns on lower timeframes contained within a single candle in MQL5?
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
Jackery
Added topic How can I check if candle highs and lows are the same within multiple timeframes using MQL5
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
Jackery
Added topic How to get Moving Average Cross price
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 ]) {       
Jackery
Added topic how to expose hidden arrow objects from custom indicator in chart's objects list
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
Jackery
Added topic How to use Candlestick Strength Indicator to access strength of a given bar in my EA
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
Jackery
Added topic How to determine if price returned to a certain region of values or not on a specific timeframe
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
Jackery
Added topic multiple errors on candlestick strength indicator
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
Jackery
Added topic How to search for a candlestick pattern on multiple timeframes
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
Jackery
Added topic How to find pips between to candle stick values
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
Jackery
Added topic How can I resolve "Not all control paths return a value" error for integer
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
Jackery
Added topic How can I determine which candle an arrow object is drawn on
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++){       
Jackery
Added topic How can I recognise programmatically when an up/down arrow is drawn on a chart?
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]);         
Jackery
Added topic How can I use CPositionInfo to determine if an opened trade is a Buy or Sell before I close?
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
Jackery
Added topic Converting MQL4 RSI and MACD to MQL5
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
Jackery
Added topic How can I change Fibonacci levels display colour?
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
Jackery
Added topic How can I get the last two fixed values of the ZigZag indicator.
In my EA below, I have programmatically drawn the default ZigZag indicator. I would like to access the last two fixed values of the ZigZag. How can I achieve this? I saw this post ( https://www.mql5.com/en/forum/131897 )but I'm not certain how to
12