PROTECTED SOURCE SCRIPT

Simple Candle Strategy

85
If you want to receive the same indicators, then write in telegram @RussianObzhina
If you want to receive the same indicators, then write in telegram @RussianObzhina
If you want to receive the same indicators, then write in telegram @RussianObzhina

, The basic concept
The strategy is based on the "Outside Bar" pattern with a breakout. This is a classic pattern that is used in price action trading.

, The logic of the work
TWO TYPES OF SIGNALS:
1. BUY signal (Long) - signalValue = 2
Conditions:

The current candle is red (open > close)

High > High of the previous candle

Low < Low of the previous candle

Close < Low of the previous candle (closing below the minimum of the previous candle)

What does this mean?:

Bearish break down

An upward reversal is expected

Entry: purchase at the opening of the next candle

2. Sell signal (Short) - signalValue = 1
Conditions:

The current candle is green (open < close)

Low < Low of the previous candle

High > High of the previous candle

Close > High of the previous candle (closing above the high of the previous candle)

What does this mean?:

Bullish Upside breakout

A downward reversal is expected

Entry: sell at the opening of the next candle

, Risk management
Stop loss:
Calculated in pips (slPips parameter)

Default: 250 pips

Formula:

For Long: Entry Price - (slPips × pipValue)

For Short: Entry Price + (slPips × pipValue)

Take-profit:
Missing from the code (which is interesting!)

Positions are closed according to two scenarios:

Automatic profit closing: the position is closed if the current price is better than the entry price

Stop loss

, Statistics from Python code
It can be seen from your Python notebook that the strategy was tested on EURUSD and GBPUSD (daily data from 2017 to 2024):

Total transactions: 431

Win rate: 87.53% (very high!)

Maximum drawdown: -11.23%

Average transaction: +0.06%

Best Deal: +1.79%

Worst deal: -2.60%

The strengths of the strategy
A high win rate (87.5%) is a statistically significant result.

Simple logic - easy to understand and modify

Clear entry rules - minimum subjectivity

Risk management through stop loss

Automatic closing of profitable positions

⚠️ Problems and risks
There is no take profit - positions are held until a stop loss or reverse signal is triggered.

Small average profit (+0.06%) - commissions can eat up profits

Volatility Dependence - The Outside Bar pattern works better in trends

False breakouts - there may be frequent losing trades on the side

Optimization for historical data - curve fitting is possible

If you want to receive the same indicators, then write in telegram @RussianObzhina

Отказ от ответственности

Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.