1) RSI indicator, period = 7 (default) 2) EMA Body, period = 30
EMA Body
Step 1. The candle body size is calculated = abs(close-open) Step 2. The average size of a body of a candle is calculated. Only 30 last candles. EMA . Step 3. If the body of the current candle is less than a half of a body of an average candle, then such candle is ignored by strategy because too small.
Strategy
If RSI < RSI Limit and the body of a candle is more than a body of an average candle / 4 - to open long. If RSI > RSI Limit and the body of a candle is more than a body of an average candle / 2 - to close long.
If RSI > (100 - RSI Limit) and the body of a candle is more than a body of an average candle / 4 - to open short. If RSI < (100 - RSI Limit) and the body of a candle is more than a body of an average candle / 2 - to close short.
If the candle a red and previous candle too red and closing of a candle is lower than closing of the previous candle and Min/Max is activated - to open long. If the candle a green and previous candle too green and closing of a candle is higher than closing of the previous candle and Min/Max is activated - to open short.
great script! im trying to adapt it into a study indicator so i can use alerts. getting stuck because the logic doesnt seem to work without the position size. any ideas?
NGBaltic
⋅
System goes long only on downtrend and stops trading when it's uptrend is it supposed to be or it's a bug?
vvairkiev
⋅
Опытным путём установлено, что на 15М timeframe графике использовать "RSI limit" = 36, а "RSI price" - open, то процент чистой прибыли самый высокий с минимальными просадками.
ROBO_Trading
⋅
@vvairkiev, это просто подгонка под данные прошлого. То есть для прошлого это оптимально, а для будущего скорее всего нет. То есть не стоит думать и в будущем так будет лучше. Впрочем это не значит что 36 хуже или лучше 30, мы не знаем. А вот RSI Price я настойчиво рекомендую ставить именно Close для любого ТФ. Так как на это рассчитан сам индикатор. То что он с Open-ценой лучше результаты показал скорее всего просто совпадение.
vvairkiev
⋅
Добрый день!
Гоняю скрипт, всё отлично, кроме логов. Неправильно высчитывается процент прибыльности/убыточности сделки. Сталкивались с таким? В чём может быть дело?
ROBO_Trading
⋅
@vvairkiev, пирамидинг видимо. А что неправильно то?
vvairkiev
⋅
@Noro, В настройках ставлю вход не "акционерным капиталом", а "USD" без пирамидинга. Сделка открывается/закрывается 13293/13550, процент прибыли в логе 1,45%, а если пересчитать, то получается 1,93%. Разница существенная.