Weekend evening - page 15

 
Sprut112:
I propose an idea: by RSI or ROC, for cross rates.
Eurgbp for example.
Buy: _rsi_eurusd[1]<_rsi_gbpusd[1] &&
_rsi_eurusd[0]>_rsi_gbpusd[0]
Sell: _rsi_gbpusd[1] < _rsi_eurusd[1] &&
_rsi_gbpusd[0] > _rsi_eurusd[0]
Period - 26

Will do. I will post it.

Name: XL7R7s.mq5
 
Sprut112:
I suggest an idea: by RSI or ROC, for cross rates.
Eurgbp for example.
Buy: _rsi_eurusd[1]<_rsi_gbpusd[1] &&
_rsi_eurusd[0]>_rsi_gbpusd[0]
Sell: _rsi_gbpusd[1] < _rsi_eurusd[1] &&
_rsi_gbpusd[0] > _rsi_eurusd[0]
Period - 26

XL7R7s.mq5

version "1.000"

Two RSIs on two symbols. Symbol for RSI #1 is used as a base - that is the symbol on which the Expert Advisor is running. Symbol for the second indicator (RSI #2) can be set.

If there is a signal, it opens a position by the main symbol.

Files:
XL7R7s.mq5  77 kb
 

I haven't found any indicator for MT5 which can show when there were several one-way candles in a row (with a choice of N identical candles in a row). Also, there is no indicator for MT5, which can show when there were several differently directed candles in a row (with a choice of N differently directed candles in a row). For MT4 there are such indicators, such as "candle" or "7Seven-ElevenPro". But for my purposes, I need an indicator for MT5, which will be able to work with indices.

Expert Advisor "N candles" will not suit me in this case, because I need a more complex algorithm for opening deals. First, I just need an indicator which is able to show one-directional candlesticks in a row and preferably in different directions. I am not sure if this is the case, but I would appreciate any help.

 
aperiked1:

I have not found any indicator for MT5 which can show when there were several one-way candles in a row (with a choice of N identical candles in a row). Also, there is no indicator for MT5, which can show when there were several differently directed candles in a row (with a choice of N differently directed candles in a row). For MT4 there are such indicators, such as "candle" or "7Seven-ElevenPro". But for my purposes, I need an indicator for MT5, which will be able to work with indices.

Expert Advisor "N candles" will not suit me in this case, because I need a more complex algorithm for opening deals. First, I just need an indicator which is able to show one-directional candlesticks in a row and preferably in different directions. Probably not exactly on topic, but I would be grateful for help.

N candles series has several versions:

N Candles v6
The Expert Advisor searches for N identical candles in a row. On bullish candlesticks are buying, on bearish ones - selling. Account type: netting or hedging. The code uses trade classes CPositionInfo, CTrade, CSymbolInfo and CAccountInfo. Version 1 N Candles; Version 2 N Candles v2; Version 3 N Candles v3; Version 4 N Candles v4; Version 5 N Candles v5. New in version 6 Added closing types when 'black sheep' meet: Closing all positions; Closing positions which are opposite to 'black sheep'; Closing positions which have the same direction as 'black sheep'. Suppose an EA is looking for 5 identical candlesticks. Once it finds them, for example, it finds five bullish candlesticks, it will open a BUY position. If the position is opened and the next candlestick is not bullish, this candlestick is the 'black sheep'. The input parameters are N identical candles which go in a row - the number of identical candles in a row; Lot - volume of the position opened; Take Profit - Take Profit, if the position...
CodeBase | 2018.02.13 14:01 |Vladimir Karputov| EAs | MetaTrader 5
N Candles v5
The Expert Advisor searches for N identical candles in a row. On bullish candlesticks are buying, and on the bearish ones - selling. It takes into account the type of trading account: netting or hedging. The code uses trade classes CPositionInfo, CTrade, CSymbolInfo, CAccountInfo. Version 1: N candles; Version 2: N Candles v2; Version 3: N Candles v3; Version 4: N Candles v4. New in version 5: introduced the 'working time' parameter - specifies the start hour of trading and the end hour of trading. Within the 'working hours' the Expert Advisor trades, outside the 'working hours' the Expert Advisor does nothing. Input parameters N identical candles which go in a row - number of identical candles in a row; Lot - position volume; Take Profit - take profit; Stop Loss - stop loss; Trailing Stop ('0 ' -> not trailing) - trailing; Trailing Step (use if Trailing Stop >0) - trailing step; Max positions volume (only for hedging accounts); Max position volume (only for netting) - maximum position volume...
CodeBase | 2017.11.29 12:27 |Vladimir Karputov| Advisors | MetaTrader 5
N Candles v4
The Expert Advisor searches for N identical candlesticks in a row. On bullish candlesticks are buying, and on bearish ones - selling. Account type: netting or hedging. The code uses trade classes CPositionInfo, CTrade, CSymbolInfo, CAccountInfo. Version 1: N Candles. Version 2: N Candles v2. Version 3: N Candles v3. New in version 4: For netting accounts, the parameter 'maximum number of positions' is replaced by the parameter 'maximum position volume'. Input parameters N candles of the same type in a row; Lot; Take Profit (in pips); Stop Loss (in pips); Trailing Stop ('0 ' → no trailing stop); Trailing Step (used if trailing stop >0); Max positions (for hedging mode only); Max position volume (for netting mode only); Magic; Slippage. Example of operation on a netting account:
CodeBase | 2017.06.21 08:59 |Vladimir Karputov| Expert Advisors | MetaTrader 5
N Candles v3
The Expert Advisor searches for N identical candlesticks in a row. On bullish candlesticks are buying, and on bearish ones - selling. In the code, we use the CPositionInfo, CTrade and CSymbolInfo trade classes. Version 1: N Candles. Version 2: N Candles v2. New in version 3: Input parameters: N identical candles included in the search string; Loth; Take Profit (in pips); Stop Loss (in pips); Trailing Stop ('0 ' -> no trailing stop); Trailing Step (used if trailing stop >0); Magic Order; Slippage. Example of search, for N=3:
CodeBase | 2017.06.16 09:41 |Vladimir Karputov| Advisors | MetaTrader 5
N Candles v2
Search for N identical candles in a row. If we see a bullish candlestick we buy, if we see a bearish candlestick we sell. New in version 2: Take Profit, Stop Loss and Trailing Stop have been implemented. Input parameters: N identical candlesticks in a required series Lot Take Profit (in pips) Stop Loss (in pips) Trailing Stop ('0 ' -> no trailing stop) Trailing Step (used if trailing stop > 0) Magic Orders Slippage Search Example, for N=3:
CodeBase | 2017.05.02 16:05 |Vladimir Karputov| Advisors | MetaTrader 5
N Candles
We're looking for N identical candlesticks in a row. If the candlestick is bullish, we buy, and if it is bearish, we sell. Setting for N identical candlesticks, going in a row; Size of lot; Magic; Slippage. Example of search, with N=3:
CodeBase | 2017.04.03 12:58 |Vladimir Karputov| Advisors | MetaTrader 5
 
Vladimir Karputov:

The N candles series has several versions:


Can we make a simple indicator for MT5 that showsN differently directed candles in a row?
 
aperiked1:
Can I make a simple indicator for MT5 that showsN differently directed candles in a row?
It is possible. You need to clarify what "N differently directed candles in a row" means.
 

Took all the standard oscillators available in the terminal, reset all their parameters and now just watch:

USDCADDaily 1.png

Fig. 1

USDCADDaily 2.png

Fig. 2

USDCADDaily 3.png

Fig. 3

 
Vladimir Karputov:

XL7R7s.mq5

version "1.000".

Two RSI on two symbols. Symbol for RSI #1 is the main symbol - that is the symbol on which the EA is running. Symbol for the second indicator (RSI #2) can be set.

If there is a signal, it opens a position on the main symbol.

Thanks, wasn't expecting any more
 
Sprut112:
Thank you, I wasn't expecting any more

So it was ready a week ago :)

 
Vladimir Karputov:

So it was ready a week ago :)

Celebration and, however)