The Expert Advisor searches for N identical candlesticks in a row. It buys on bullish candlesticks and sells on bearish ones. The account type is taken into account, i.e. whether it is netting or hedging. The CPositionInfo, CTrade and CSymbolInfo classes are used in the code.
Version 1: N candles
Version 2: N- candles v2
Version 3: N-_Candles_v3:
New in version 4: on netting accounts, the "maximum position volume" parameter is used instead of "maximum number of items".
An example of EA operation on a netting account:
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/18609
The Boa_ZigZag zigzag, with values displayed as fractal labels.Boa_ZigZag_Price
The Boa_ZigZag indicator with price labels of the ZigZag peak values.
Envelopes using the Color_QEMA_Digit MA, with an indication of trend direction and display of the last values of channel borders.Color_PEMA_Envelopes_Digit
Envelopes using the Color_PEMA_Digit MA, with an indication of trend direction and display of the last values of channel borders.