İş Gereklilikleri
This is the tradingview strategy:
I made a few adjustments in the TV Code, also willing to provide this to the developer.
The adjusted code has the following additional attributes:
- no repaint of the signals
- (T)SL and (T)TP Settings based on ATR
Additionally i would like to include the following:
- Option for trade execution in the input:
Option1: Long Entry Signal = Short Close Signal (Netting)
Option2: Trade with fixed ATR, SL and TP are multiplier of the ATR. By default this option is enabled and the value for ATR is 14, SL Multiplier is 3 and TP Multiplier is 6. There should be an option to enable "Move SL to BE after 1R"
Option3: The ATR is gathered from the current market environment. With this setting use SL Multiplier = 3 and TP Multiplier = 6 as default.
Option4. Trade with fixed ATR, SL and TP are multiplier of the ATR. The take profit is moved "upwards" until the signal in the opposite direction appears. SL is also moved "downwards" until the signal of the opposite direction occurs.
short_trailing = low + atr * atr_multiplier_sl
1. Strategy Fundamentals
- The strategy uses the Kaufman Adaptive Moving Average (KAMA) to identify trends and pairs it with Heikin-Ashi candles.
- Two moving averages are calculated:
- Black moving average (bfma): Based on Heikin-Ashi logic with adjustments.
- Red moving average (bsma): A slower exponential moving average (SMA) over a longer period.
2. Signals
- Long Entry: When the black moving average (bfma) crosses above the red moving average (bsma).
- Short Entry: When the black moving average crosses below the red moving average.
3. Entry and Exit Logic
- Entry: A Long or Short position is opened based on the crossover signals:
- Long Trade: Black MA crosses above Red MA.
- Short Trade: Black MA crosses below Red MA.
- Exit: Positions are closed when:
- The Stop-Loss level is hit.
- The Take-Profit level is hit.
- The Trailing Stop is triggered.
4. SL and TP:
- as described above.
5. Visualization
- The strategy plots the following on the chart:
- Black line: Fast moving average (bfma).
- Red line: Slow moving average (bsma).
- Stop-Loss and Take-Profit levels for both Long and Short trades.
- Display SL and TP as short lines on the chart
- Display the SL and TP Values in a small table to the bottom left corner of the chart (box size and font size adjustable)
- There should be an overview of which signal would currently be active on which timeframe: This could look like this:
Timeframe | Current trade direction |
---|---|
1min | buy |
5min | buy |
15min | buy |
30min | buy |
1h | short |
2h | short |
4h | short |
1d | short |