Forum

How to find out if a two dimensional array has a certain pair of values

I've read about ArrayBsearch but from docs I don't know whether it can be used to search for an element in a two dimensional array. I have the following array: double sZones[][ 2 ]; double upperVal = 0.2312 ; double upperVal = 0.2303 ; How can I search through each of the contained double pairs to

How to find two candlesticks from two different timeframes with same high and open (upper wick)

I am trying to search through timeframes from M20 to M4 for two bearish candlesticks from two different time frames that have the same high and open. The two candles may not be from consecutive timeframes. The images below give a better idea of what I am trying to achieve. For some strange reason

Issues with finding a candle pattern between H6 and M20 timeframes every 6 hours using MQL5

Basically I have been able to write the code for the candle pattern. The candle pattern is satisfied when the upper wick of 3 consecutive timeframes has the same High and Close for a bullish candle. The details of the pattern are explained in the attached images . I am trying to get all the

How can I calculate lot size risking X% of account balance programmatically

I have written code the place a send order but I want to be able to calculate the lot size based on a few things. Given the entry price and stop loss, how can I calculate my lot size so that 2.5% of my current account balance would be risked on trades? I know how to calculate the number of pips