Initial Commit ...

This commit is contained in:
2024-01-25 04:07:49 +03:30
commit e24b73106d
76 changed files with 9457 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
# Range Filter Scalping (XST_RF15M)
## Setup
- **TF**: 15m
- **Asset**: TSLA
- **R2R**: 1:1.5
- **Indicators**:
- Range Filter Buy and Sell 5min (gulkroth):
- Hide Bar Colors;
- Change Sampling Period to 41
- **Oscillators**:
- Stockastic Histogram (nboone):
- Change Plot 0 to Area;
## Using the Strategy
### Long/Buy Conditions
- RF gives BUY Signal;
- Price is Above RF Line;
- Stochastic is Green;
- Market forms a Bullish Candle;
#### Long SL
place sl at below of RF low line;
#### Long TP
calculate based on R2R;
### Short/Sell Conditions
- RF gives SELL Signal;
- Price is below RF Line;
- Stochastic is Red;
- Market forms a Bearish Candle;
#### Short SL
place sl at high of RF Target Range.
#### Short TP
calculate based on R2R;
### Signals Overlap
how to handle signals overlaps.
+66
View File
@@ -0,0 +1,66 @@
# XST_SR15M
## Report
### Makret
ETHUSDT
### Exchange
Kucoin
### Time Frame
15min
### Start Date
06 may 2023 | 01:45
### End Date
20 may 2023 | 00:30
### Risk to Reward
1:1.5
### Reports
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | x | | |
| 2 | Short | x | | |
| 3 | Short | x | | |
| 4 | Short | x | | |
| 5 | Short | | x | |
| 6 | Short | x | | |
| 7 | Short | | x | |
| 8 | Short | x | | |
| 9 | Short | | x | |
| 10 | Short | | | Open |
| 11 | Short | | x | |
| 12 | Short | x | | |
| 13 | Long | | x | Close In Profit before Next Signal |
| 14 | Long | | x | |
| 15 | Long | x | | Close In Profit before Next Signal |
| 16 | Long | x | | |
| 17 | Long | x | | |
| 18 | Long | x | | |
| 19 | Long | x | | |
| 20 | Long | x | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :-: | :-: | :-: | :-: |
| Shorts | 12 | 07 | 04 | 01 Open
| Longs | 08 | 06 | 02 |
| Total | 20 | 13 | 06 |
#### Analysis
per trade volume: 10$
total spending: 200$
total comeback: 195$
+287
View File
@@ -0,0 +1,287 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center XTrade RF15M Strategy
// ---------------------------------------------
// in this strategy i must use:
// - Price Action Candle Recognition;
// -
//
// Maintainer:
// ------------
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
//
//////////////////////////////////////////////////////
//
//@version=5
indicator(title="SaherElm XTrade RF15M Strategy", shorttitle = "XST_RF15M", overlay = true)
//
// START Inputs ....
//
//
// Determines Show Signals or not ...
showSignals = input.bool(defval = true, title = "Show Signals", group = "Strategy")
showStopLosses = input.bool(defval = true, title = "Show Stop Losses", group = "Strategy")
showRangeFilter = input.bool(defval = false, title = "Show Range Filter", group = "Strategy")
//
// Show Signals based on their types ...
showLongSignals = input.bool(defval = true, title = "Show Long Signals", group = "Signals")
showShortSignals = input.bool(defval = true, title = "Show Short Signals", group = "Signals")
//
// Show Stop Losses based on their types ...
showLongStopLosses = input.bool(defval = true, title = "Show Long Stop Losses", group = "Stop Loss")
showShortStopLosses = input.bool(defval = true, title = "Show Short Stop Losses", group = "Stop Loss")
//
// END Inputs ....
//
//
// START Functions ....
//
//////////////////////////////
// START Price Action Candles
//////////////////////////////
//
// Retrieve Specific Candle Height (based on low and high) ...
getCandleRange() =>
high - low
//
// Retrieve Candle Ranges Thirs Section ...
getCandleThird() =>
getCandleRange() / 3
//
// Determines a Candle is Bullish or not ...
isBullishCandle() =>
close > low + (getCandleThird() * 2)
//
// Determines a Candle is Bearish or not ...
isNeutralCandle() =>
close < low + (getCandleThird() * 2) and close > low + getCandleThird()
//
// Determines a Candle is Neutral or not ...
isBearishCandle() =>
close < low + getCandleThird()
/////////////////////////////
// END Price Action Candles
/////////////////////////////
///////////////////////////////
// START Range Filter Buy Sell
///////////////////////////////
//
// Smooth Average Range
smoothAverageRange(x, t, m) =>
wper = t * 2 - 1
avrng = ta.ema(math.abs(x - x[1]), t)
result = ta.ema(avrng, wper) * m
result
//
// Range Filter ...
rangeFilter(x, r) =>
result = x
result := x > nz(result[1]) ? x - r < nz(result[1]) ? nz(result[1]) : x - r : x + r > nz(result[1]) ? nz(result[1]) : x + r
result
///////////////////////////////
// END Range Filter Buy Sell
///////////////////////////////
//
// END Functions ....
//
//
// START Calculations ....
//
//
var shortColor = color.red
var longColor = color.lime
var longStopLossColor = color.fuchsia
var shortStopLossColor = color.aqua
//////////////////////////////
// START Price Action Candles
//////////////////////////////
//
var bullishColor = color.lime
var bullishShape = shape.arrowup
var bullishTitle = "Bullish"
var bullishType = 1
//
var bearishColor = color.red
var bearishShape = shape.arrowdown
var bearishTitle = "Bearish"
var bearishType = -1
//
var neutralColor = color.gray
var neutralShape = shape.circle
var neutralTitle = "Neutral"
var neutralType = 0
//
candleType = isBullishCandle() ? bullishType : isNeutralCandle() ? neutralType : isBearishCandle() ? bearishType : neutralType
//
prevCandleType = not na(candleType[1]) ? candleType[1] : neutralType
//
candleNeighborhoodBaseType = prevCandleType + candleType
/////////////////////////////
// END Price Action Candles
/////////////////////////////
///////////////////////////////
// START Range Filter Buy Sell
///////////////////////////////
//
// Source
RFBSSrc = close
//
// Sampling Period
RFBSPer = 41
//
// Range Multiplier ...
RFBSMult = 3.0
//
// Color variables ...
RFBSUpColor = color.green
RFBSMidColor = color.blue
RFBSDownColor = color.red
//
RFBSSmrng = smoothAverageRange(RFBSSrc, RFBSPer, RFBSMult)
RFBSFilt = rangeFilter(RFBSSrc, RFBSSmrng)
//
// Filter UP Direction ...
RFBSUpward = 0.0
RFBSUpward := RFBSFilt > RFBSFilt[1] ? nz(RFBSUpward[1]) + 1 : RFBSFilt < RFBSFilt[1] ? 0 : nz(RFBSUpward[1])
//
// Filter DOWN Direction ...
RFBSDownward = 0.0
RFBSDownward := RFBSFilt < RFBSFilt[1] ? nz(RFBSDownward[1]) + 1 : RFBSFilt > RFBSFilt[1] ? 0 : nz(RFBSDownward[1])
//
// Target Bands
RFBSHband = RFBSFilt + RFBSSmrng
RFBSLband = RFBSFilt - RFBSSmrng
//
// Colors
RFBSFiltcolor = RFBSUpward > 0 ? RFBSUpColor : RFBSDownward > 0 ? RFBSDownColor : RFBSMidColor
RFBSBarcolor = RFBSSrc > RFBSFilt and RFBSSrc > RFBSSrc[1] and RFBSUpward > 0 ? RFBSUpColor : RFBSSrc > RFBSFilt and RFBSSrc < RFBSSrc[1] and RFBSUpward > 0 ? RFBSUpColor : RFBSSrc < RFBSFilt and RFBSSrc < RFBSSrc[1] and RFBSDownward > 0 ? RFBSDownColor : RFBSSrc < RFBSFilt and RFBSSrc > RFBSSrc[1] and RFBSDownward > 0 ? RFBSDownColor : RFBSMidColor
//
// Break Outs
RFBSLongCond = bool(na)
RFBSShortCond = bool(na)
RFBSLongCond := RFBSSrc > RFBSFilt and RFBSSrc > RFBSSrc[1] and RFBSUpward > 0 or RFBSSrc > RFBSFilt and RFBSSrc < RFBSSrc[1] and RFBSUpward > 0
RFBSShortCond := RFBSSrc < RFBSFilt and RFBSSrc < RFBSSrc[1] and RFBSDownward > 0 or RFBSSrc < RFBSFilt and RFBSSrc > RFBSSrc[1] and RFBSDownward > 0
//
RFBSCondIni = 0
RFBSCondIni := RFBSLongCond ? 1 : RFBSShortCond ? -1 : RFBSCondIni[1]
RFBSLongCondition = RFBSLongCond and RFBSCondIni[1] == -1
RFBSShortCondition = RFBSShortCond and RFBSCondIni[1] == 1
///////////////////////////////
// END Range Filter Buy Sell
///////////////////////////////
///////////////////////////////
// START Stochastic Histogram
///////////////////////////////
//
STHSLength = 14
STHSSmoothK = 3
//
STHSK = (ta.sma(ta.stoch(close, high, low, STHSLength), STHSSmoothK) - 50)
///////////////////////////////
// END Stochastic Histogram
///////////////////////////////
///////////////////////
// START Strategy ...
///////////////////////
//
canShowStopLoss = showSignals and showStopLosses and (showLongSignals or showShortSignals) and (showLongStopLosses or showShortStopLosses)
canShowLongStopLoss = canShowStopLoss and showLongStopLosses and not na(RFBSLongCondition)
canShowShortStopLoss = canShowStopLoss and showShortStopLosses and not na(RFBSShortCondition)
//
hasSignal = RFBSLongCondition or RFBSShortCondition
//
// Stochastic Verification ...
isStochasticLongVerified = STHSK > 0
isStochasticShortVerified = STHSK < 0
//
// and open > RFBSFilt ...
// and close > RFBSFilt ...
hasLongSignal = hasSignal and not na(RFBSLongCondition) and open > RFBSFilt and isBullishCandle() and isStochasticLongVerified
longSignal = hasLongSignal ? RFBSLongCondition : na
longStopLoss = RFBSLband
//
hasShortSignal = hasSignal and not na(RFBSShortCondition) and isBearishCandle() and isStochasticShortVerified
shortSignal = hasShortSignal ? RFBSShortCondition : na
shortStopLoss = RFBSHband
//
canShowSignal = showSignals and (showLongSignals or showShortSignals)
canShowLongSignal = canShowSignal and showLongSignals and hasLongSignal
canShowShortSignal = canShowSignal and showShortSignals and hasShortSignal
///////////////////////
// END Strategy ...
///////////////////////
//
// END Calculations ....
//
//
// START Plots ....
//
//
// Signals ...
plotshape(canShowLongSignal ? longSignal : na, title = "Long Signal", color = longColor, location = location.belowbar, style = shape.triangleup, size = size.normal)
plotshape(canShowShortSignal ? shortSignal : na, title = "Short Signal", color = shortColor, location = location.abovebar, style = shape.triangledown, size = size.normal)
//
plot(series = showRangeFilter ? RFBSFilt : na, color = RFBSFiltcolor, linewidth = 2, title = "RFBS > Range Filter", style = plot.style_line)
//
// Stop Losses ...
plot(series = canShowLongStopLoss ? longStopLoss : na, color = longStopLossColor, linewidth = 1, style = plot.style_line, title = "Long Stop Loss")
plot(series = canShowShortStopLoss ? shortStopLoss : na, color = shortStopLossColor, linewidth = 1, style = plot.style_line, title = "Short Stop Loss")
//
// END Plots ....
//
//
// START Alerts ...
//
alertcondition(hasSignal, "XST_RF15M > Signal")
alertcondition(hasLongSignal, "XST_RF15M > Long Signal")
alertcondition(hasShortSignal, "XST_RF15M > Short Signal")
//
// END Alerts ...
//
//////////////////////////////////////////////////////
// TODOS:
// -------
// - []
//////////////////////////////////////////////////////
@@ -0,0 +1,118 @@
# XST_CC_OSC
## Report
### Makret
ADAUSDT.P
### Exchange
Binance
### Time Frame
15min
### Start Date
Longs:
19 may 2023 | 12:00 UTC
Shorts:
18 may 2023 | 00:00 UTC
### End Date
Longs:
23 may 2023 | 01:15 UTC
Shorts:
23 may 2023 | 12:45 UTC
### Risk to Reward
1:1.5
### Reports
#### Longs
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Long | x | | |
| 2 | Long | x | | |
| 3 | Long | | x | |
| 4 | Long | | x | |
| 5 | Long | | x | |
| 6 | Long | x | | |
| 7 | Long | x | | |
| 8 | Long | x | | |
| 9 | Long | x | | |
| 10 | Long | x | | |
| 11 | Long | | x | |
| 12 | Long | x | | |
| 13 | Long | x | | |
| 14 | Long | x | | |
| 15 | Long | | x | |
| 16 | Long | | x | |
| 17 | Long | x | | |
| 18 | Long | x | | |
| 19 | Long | x | | |
| 20 | Long | x | | |
| 21 | Long | x | | |
| 22 | Long | x | | |
| 23 | Long | x | | |
| 24 | Long | x | | |
| 25 | Long | x | | |
#### Shorts
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | x | | |
| 2 | Short | x | | |
| 3 | Short | x | | |
| 4 | Short | x | | |
| 5 | Short | x | | |
| 6 | Short | x | | |
| 7 | Short | x | | |
| 8 | Short | | x | |
| 9 | Short | x | | |
| 10 | Short | x | | |
| 11 | Short | | x | |
| 12 | Short | x | | |
| 13 | Short | x | | |
| 14 | Short | x | | |
| 15 | Short | | x | |
| 16 | Short | x | | |
| 17 | Short | x | | |
| 18 | Short | x | | |
| 19 | Short | | x | |
| 20 | Short | x | | |
| 21 | Short | | x | |
| 22 | Short | x | | |
| 23 | Short | | x | Open |
| 24 | Short | x | | |
| 25 | Short | x | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :----: | :-: | :-: | :-: |
| Longs | 25 | 19 | 06 |
| Shorts | 25 | 19 | 06 |
| Total | 50 | 38 | 12 |
#### Analysis
per trade volume: 10$
total drawdown: 500$
total lose: 120$
total reward: 570$
total cash: 380$ + 570$ = 950$
win rate: 90%
@@ -0,0 +1,118 @@
# XST_CC_OSC
## Report
### Makret
BNBUSDT.P
### Exchange
Binance
### Time Frame
15min
### Start Date
Longs:
17 may 2023 | 22:45 UTC
Shorts:
17 may 2023 | 10:00 UTC
### End Date
Longs:
23 may 2023 | 01:15 UTC
Shorts:
23 may 2023 | 11:00 UTC
### Risk to Reward
1:1.5
### Reports
#### Longs
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Long | x | | |
| 2 | Long | x | | |
| 3 | Long | x | | |
| 4 | Long | x | | |
| 5 | Long | x | | |
| 6 | Long | x | | |
| 7 | Long | x | | |
| 8 | Long | | x | |
| 9 | Long | x | | |
| 10 | Long | x | | |
| 11 | Long | | x | |
| 12 | Long | | x | |
| 13 | Long | x | | |
| 14 | Long | x | | |
| 15 | Long | x | | |
| 16 | Long | x | | |
| 17 | Long | x | | |
| 18 | Long | | x | |
| 19 | Long | | x | |
| 20 | Long | x | | |
| 21 | Long | x | | |
| 22 | Long | x | | |
| 23 | Long | x | | |
| 24 | Long | x | | |
| 25 | Long | x | | |
#### Shorts
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | x | | |
| 2 | Short | x | | |
| 3 | Short | | x | |
| 4 | Short | x | | |
| 5 | Short | x | | |
| 6 | Short | x | | |
| 7 | Short | | x | |
| 8 | Short | x | | |
| 9 | Short | x | | |
| 10 | Short | | x | |
| 11 | Short | | x | |
| 12 | Short | | x | |
| 13 | Short | x | | |
| 14 | Short | | x | |
| 15 | Short | x | | |
| 16 | Short | x | | |
| 17 | Short | x | | |
| 18 | Short | x | | |
| 19 | Short | x | | |
| 20 | Short | x | | |
| 21 | Short | x | | |
| 22 | Short | x | | |
| 23 | Short | x | | |
| 24 | Short | | x | |
| 25 | Short | x | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :----: | :-: | :-: | :-: |
| Longs | 25 | 20 | 05 |
| Shorts | 25 | 18 | 07 |
| Total | 50 | 38 | 12 |
#### Analysis
per trade volume: 10$
total drawdown: 500$
total lose: 120$
total reward: 570$
total cash: 380$ + 570$ = 950$
win rate: 90%
@@ -0,0 +1,106 @@
# XST_CC_OSC
## Report
### Makret
DOGEUSDT.P
### Exchange
Binance
### Time Frame
15min
### Start Date
19 may 2023 | 12:00 UTC
### End Date
23 may 2023 | 01:15 UTC
### Risk to Reward
1:1.5
### Reports
#### Longs
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Long | x | | |
| 2 | Long | x | | |
| 3 | Long | | x | |
| 4 | Long | x | | |
| 5 | Long | | x | |
| 6 | Long | x | | |
| 7 | Long | | x | |
| 8 | Long | x | | |
| 9 | Long | | x | |
| 10 | Long | x | | |
| 11 | Long | x | | |
| 12 | Long | x | | |
| 13 | Long | x | | |
| 14 | Long | | x | |
| 15 | Long | | x | |
| 16 | Long | x | | |
| 17 | Long | x | | |
| 18 | Long | x | | |
| 19 | Long | x | | |
| 20 | Long | x | | |
| 21 | Long | x | | |
| 22 | Long | x | | |
| 23 | Long | x | | |
| 24 | Long | | x | |
| 25 | Long | x | | |
#### Shorts
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | | | |
| 2 | Short | | | |
| 3 | Short | | | |
| 4 | Short | | | |
| 5 | Short | | | |
| 6 | Short | | | |
| 7 | Short | | | |
| 8 | Short | | | |
| 9 | Short | | | |
| 10 | Short | | | |
| 11 | Short | | | |
| 12 | Short | | | |
| 13 | Short | | | |
| 14 | Short | | | |
| 15 | Short | | | |
| 16 | Short | | | |
| 17 | Short | | | |
| 18 | Short | | | |
| 19 | Short | | | |
| 20 | Short | | | |
| 21 | Short | | | |
| 22 | Short | | | |
| 23 | Short | | | |
| 24 | Short | | | |
| 25 | Short | | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :----: | :-: | :-: | :-: |
| Longs | 25 | 18 | 07 |
| Shorts | 00 | 00 | 00 |
| Total | 00 | 00 | 00 |
#### Analysis
per trade volume: 10$
total drawdown: 250$
total lose: 70$
total reward: 270$
total cash: 180$ + 270$ = 450$
win rate: 80%
@@ -0,0 +1,131 @@
# XST_CC_OSC
## Report
### Makret
ETCUSDT.P
### Exchange
BINANCE
### Time Frame
15min
### Start Date
13 may 2023 | 08:45 UTC
### End Date
23 may 2023 | 06:00 UTC
### Risk to Reward
1:1.5
### Reports
#### Longs
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Long | x | | |
| 2 | Long | x | | |
| 3 | Long | x | | |
| 4 | Long | x | | |
| 5 | Long | x | | |
| 6 | Long | x | | |
| 7 | Long | x | | |
| 8 | Long | x | | |
| 9 | Long | x | | |
| 10 | Long | | x | |
| 11 | Long | | x | |
| 12 | Long | x | | |
| 13 | Long | x | | |
| 14 | Long | x | | |
| 15 | Long | x | | |
| 16 | Long | | x | |
| 17 | Long | x | | |
| 18 | Long | x | | |
| 19 | Long | x | | |
| 20 | Long | | x | |
| 21 | Long | | x | |
| 22 | Long | x | | |
| 23 | Long | | x | |
| 24 | Long | x | | |
| 25 | Long | x | | |
| 26 | Long | x | | |
| 27 | Long | x | | |
| 28 | Long | x | | |
| 29 | Long | x | | |
| 30 | Long | x | | |
| 31 | Long | x | | |
| 32 | Long | | x | |
| 33 | Long | x | | |
| 34 | Long | x | | |
| 35 | Long | | x | |
| 36 | Long | x | | |
| 37 | Long | x | | |
| 38 | Long | x | | |
| 39 | Long | | x | |
| 40 | Long | | x | |
| 41 | Long | | x | |
| 42 | Long | | x | |
| 43 | Long | x | | |
| 44 | Long | x | | |
| 45 | Long | x | | |
| 46 | Long | | x | |
| 47 | Long | x | | |
| 48 | Long | x | | |
| 49 | Long | x | | |
| 50 | Long | x | | |
#### Shorts
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | | | |
| 2 | Short | | | |
| 3 | Short | | | |
| 4 | Short | | | |
| 5 | Short | | | |
| 6 | Short | | | |
| 7 | Short | | | |
| 8 | Short | | | |
| 9 | Short | | | |
| 10 | Short | | | |
| 11 | Short | | | |
| 12 | Short | | | |
| 13 | Short | | | |
| 14 | Short | | | |
| 15 | Short | | | |
| 16 | Short | | | |
| 17 | Short | | | |
| 18 | Short | | | |
| 19 | Short | | | |
| 20 | Short | | | |
| 21 | Short | | | |
| 22 | Short | | | |
| 23 | Short | | | |
| 24 | Short | | | |
| 25 | Short | | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :----: | :-: | :-: | :-: |
| Longs | 50 | 37 | 13 |
| Shorts | 00 | 00 | 00 |
| Total | 50 | 37 | 13 |
#### Analysis
per trade volume: 10$
total drawdown: 500$
total lose: 130$
total reward: 555$
total cash: 555$ + 370$ = 925$
win rate: 85%
@@ -0,0 +1,106 @@
# XST_CC_OSC
## Report
### Makret
ETHUSDT
### Exchange
Kucoin
### Time Frame
15min
### Start Date
18 may 2023 | 01:00 UTC
### End Date
23 may 2023 | 01:15 UTC
### Risk to Reward
1:1.5
### Reports
#### Longs
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Long | x | | |
| 2 | Long | x | | |
| 3 | Long | x | | |
| 4 | Long | x | | |
| 5 | Long | x | | |
| 6 | Long | x | | |
| 7 | Long | x | | |
| 8 | Long | x | | |
| 9 | Long | x | | |
| 10 | Long | x | | |
| 11 | Long | x | | |
| 12 | Long | x | | |
| 13 | Long | x | | |
| 14 | Long | x | | |
| 15 | Long | | x | |
| 16 | Long | | x | |
| 17 | Long | x | | |
| 18 | Long | | x | |
| 19 | Long | | x | |
| 20 | Long | | x | |
| 21 | Long | x | | |
| 22 | Long | x | | |
| 23 | Long | x | | |
| 24 | Long | x | | |
| 25 | Long | x | | |
#### Shorts
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | | | |
| 2 | Short | | | |
| 3 | Short | | | |
| 4 | Short | | | |
| 5 | Short | | | |
| 6 | Short | | | |
| 7 | Short | | | |
| 8 | Short | | | |
| 9 | Short | | | |
| 10 | Short | | | |
| 11 | Short | | | |
| 12 | Short | | | |
| 13 | Short | | | |
| 14 | Short | | | |
| 15 | Short | | | |
| 16 | Short | | | |
| 17 | Short | | | |
| 18 | Short | | | |
| 19 | Short | | | |
| 20 | Short | | | |
| 21 | Short | | | |
| 22 | Short | | | |
| 23 | Short | | | |
| 24 | Short | | | |
| 25 | Short | | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :----: | :-: | :-: | :-: |
| Longs | 25 | 20 | 05 |
| Shorts | 00 | 00 | 00 |
| Total | 00 | 00 | 00 |
#### Analysis
per trade volume: 10$
total drawdown: 250$
total lose: 60$
total reward: 285$
total cash: 190$ + 285$ = 475$
win rate: 90%
@@ -0,0 +1,107 @@
# XST_???
## Report
### Makret
LTCUSDT
### Exchange
KUCOIN
### Time Frame
15min
### Start Date
24 may 2023 | 17:30 UTC
### End Date
29 may 2023 | 20:00 UTC
### Risk to Reward
1:1.5
### Reports
#### Longs
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Long | x | | |
| 2 | Long | x | | |
| 3 | Long | x | | |
| 4 | Long | x | | |
| 5 | Long | x | | |
| 6 | Long | x | | |
| 7 | Long | | x | |
| 8 | Long | x | | |
| 9 | Long | x | | |
| 10 | Long | | x | |
| 11 | Long | x | | |
| 12 | Long | x | | |
| 13 | Long | x | | |
| 14 | Long | x | | |
| 15 | Long | x | | |
| 16 | Long | x | | |
| 17 | Long | x | | |
| 18 | Long | x | | |
| 19 | Long | x | | |
| 20 | Long | x | | |
| 21 | Long | x | | |
| 22 | Long | x | | |
| 23 | Long | x | | |
| 24 | Long | | x | |
| 25 | Long | x | | |
| 26 | Long | x | | |
| 27 | Long | x | | |
#### Shorts
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | x | | |
| 2 | Short | x | | |
| 3 | Short | x | | |
| 4 | Short | | x | |
| 5 | Short | x | | |
| 6 | Short | x | | |
| 7 | Short | x | | |
| 8 | Short | x | | |
| 9 | Short | x | | |
| 10 | Short | x | | |
| 11 | Short | x | | |
| 12 | Short | | x | |
| 13 | Short | x | | |
| 14 | Short | x | | |
| 15 | Short | x | | |
| 16 | Short | | x | |
| 17 | Short | x | | |
| 18 | Short | x | | |
| 19 | Short | x | | |
| 20 | Short | x | | |
| 21 | Short | x | | |
| 22 | Short | x | | |
| 23 | Short | x | | |
| 24 | Short | | x | |
#### Signals Results
| Type | Count | TPs | SLs |
| :----: | :-: | :-: | :-: |
| Longs | 27 | 24 | 03 |
| Shorts | 24 | 20 | 04 |
| Total | 51 | 44 | 07 |
#### Analysis
per trade volume: 10$
total drawdown: 510$
total lose: 70$
total reward: 660$
total cash: 440$ + 660$ = 1100$
win rate: 129.4%
@@ -0,0 +1,106 @@
# XST_CC_OSC
## Report
### Makret
XRPUSDT.P
### Exchange
Binance
### Time Frame
15min
### Start Date
19 may 2023 | 00:30 UTC
### End Date
23 may 2023 | 02:00 UTC
### Risk to Reward
1:1.5
### Reports
#### Longs
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Long | x | | |
| 2 | Long | x | | |
| 3 | Long | x | | |
| 4 | Long | | x | |
| 5 | Long | x | | |
| 6 | Long | | x | |
| 7 | Long | x | | |
| 8 | Long | x | | |
| 9 | Long | x | | |
| 10 | Long | x | | |
| 11 | Long | x | | |
| 12 | Long | x | | |
| 13 | Long | x | | |
| 14 | Long | x | | |
| 15 | Long | | x | |
| 16 | Long | x | | |
| 17 | Long | x | | |
| 18 | Long | x | | |
| 19 | Long | | x | |
| 20 | Long | x | | |
| 21 | Long | x | | |
| 22 | Long | x | | |
| 23 | Long | x | | |
| 24 | Long | x | | |
| 25 | Long | x | | |
#### Shorts
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | | | |
| 2 | Short | | | |
| 3 | Short | | | |
| 4 | Short | | | |
| 5 | Short | | | |
| 6 | Short | | | |
| 7 | Short | | | |
| 8 | Short | | | |
| 9 | Short | | | |
| 10 | Short | | | |
| 11 | Short | | | |
| 12 | Short | | | |
| 13 | Short | | | |
| 14 | Short | | | |
| 15 | Short | | | |
| 16 | Short | | | |
| 17 | Short | | | |
| 18 | Short | | | |
| 19 | Short | | | |
| 20 | Short | | | |
| 21 | Short | | | |
| 22 | Short | | | |
| 23 | Short | | | |
| 24 | Short | | | |
| 25 | Short | | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :----: | :-: | :-: | :-: |
| Longs | 25 | 21 | 04 |
| Shorts | 00 | 00 | 00 |
| Total | 00 | 00 | 00 |
#### Analysis
per trade volume: 10$
total drawdown: 250$
total lose: 40$
total reward: 315$
total cash: 210$ + 315$ = 525$
win rate: 137.5%
+299
View File
@@ -0,0 +1,299 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center XTrade SCCH15M Strategy
// ---------------------------------------------
// SaherElm Custom Private Strategy ...
//
// Maintainer:
// ------------
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
//
//////////////////////////////////////////////////////
//
//@version=5
indicator(title="SaherElm XTrade SCCH15M Strategy", shorttitle = "XST_SCCH15M", overlay = true)
//
// START Inputs ....
//
//
// Determines Show Signals or not ...
showSignals = input.bool(defval = true, title = "Show Signals", group = "Strategy")
showStopLosses = input.bool(defval = true, title = "Show Stop Losses", group = "Strategy")
showTakeProfits = input.bool(defval = true, title = "Show Take Profits", group = "Strategy")
//
// Show Signals based on their types ...
showLongSignals = input.bool(defval = true, title = "Show Long Signals", group = "Signals")
showShortSignals = input.bool(defval = true, title = "Show Short Signals", group = "Signals")
//
// Show Stop Losses based on their types ...
swingLoopback = input.int(defval = 7, title = "Swing Loopback Period", group = "Stop Loss")
showLongStopLosses = input.bool(defval = true, title = "Show Long Stop Losses", group = "Stop Loss")
showShortStopLosses = input.bool(defval = true, title = "Show Short Stop Losses", group = "Stop Loss")
//
// Take Profits ...
riskRewardRatio = input.float(defval = 1.5, title = "Risk To Reward Ratio", group = "Take Profit")
//
longTakeProfitColor = input.color(defval = color.yellow, title = "Long TPs Color", group = "Take Profit")
shortTakeProfitColor = input.color(defval = color.lime, title = "Short TPs Color", group = "Take Profit")
//
showLongTakeProfits = input.bool(defval = true, title = "Show Long Take Profits", group = "Take Profit")
showShortTakeProfits = input.bool(defval = true, title = "Show Short Take Profits", group = "Take Profit")
//
// END Inputs ....
//
//
// START Functions ....
//
//////////////////////////////
// START Price Action Candles
//////////////////////////////
//
// Retrieve Specific Candle Height (based on low and high) ...
getCandleRange() =>
high - low
//
// Retrieve Candle Ranges Thirs Section ...
getCandleThird() =>
getCandleRange() / 3
//
// Determines a Candle is Bullish or not ...
isBullishCandle() =>
close > low + (getCandleThird() * 2)
//
// Determines a Candle is Bearish or not ...
isNeutralCandle() =>
close < low + (getCandleThird() * 2) and close > low + getCandleThird()
//
// Determines a Candle is Neutral or not ...
isBearishCandle() =>
close < low + getCandleThird()
/////////////////////////////
// END Price Action Candles
/////////////////////////////
//
// END Functions ....
//
//
// START Calculations ....
//
//
var longColor = color.aqua
var shortColor = color.fuchsia
var longStopLossColor = color.fuchsia
var shortStopLossColor = color.aqua
//////////////////////////////
// START Price Action Candles
//////////////////////////////
//
var bullishColor = color.lime
var bullishShape = shape.arrowup
var bullishTitle = "Bullish"
var bullishType = 1
//
var bearishColor = color.red
var bearishShape = shape.arrowdown
var bearishTitle = "Bearish"
var bearishType = -1
//
var neutralColor = color.gray
var neutralShape = shape.circle
var neutralTitle = "Neutral"
var neutralType = 0
//
candleType = isBullishCandle() ? bullishType : isNeutralCandle() ? neutralType : isBearishCandle() ? bearishType : neutralType
//
prevCandleType = not na(candleType[1]) ? candleType[1] : neutralType
//
candleNeighborhoodBaseType = prevCandleType + candleType
/////////////////////////////
// END Price Action Candles
/////////////////////////////
////////////////////////////
// START Last Market Price
////////////////////////////
//
lastMarketLowest = ta.lowest(low, swingLoopback)
lastMarketLowest2 = ta.lowest(low, swingLoopback * 2)
lastMarketLowest3 = ta.lowest(low, swingLoopback * 3)
//
lastMarketHighest = ta.highest(high, swingLoopback)
lastMarketHighest2 = ta.highest(high, swingLoopback * 2)
lastMarketHighest3 = ta.highest(high, swingLoopback * 3)
////////////////////////////
// END Last Market Price
////////////////////////////
///////////////////////
// START Cycle Channel
///////////////////////
//
CCHSclT = 10
CCHMclT = 30
CCHScm = 1.0
CCHMcm = 3.0
CCHSrc = close
CCHEbc = false
//
CCHScl = CCHSclT / 2
CCHMcl = CCHMclT / 2
//
CCHMaScl = ta.rma(CCHSrc, CCHScl)
CCHMaMcl = ta.rma(CCHSrc, CCHMcl)
//
CCHScmOff = CCHScm * ta.atr(CCHScl)
CCHMcmOff = CCHMcm * ta.atr(CCHMcl)
//
CCHScl2 = CCHScl / 2
CCHMcl2 = CCHMcl / 2
//
CCHSct = nz(CCHMaScl[CCHScl2], CCHSrc) + CCHScmOff
CCHScb = nz(CCHMaScl[CCHScl2], CCHSrc) - CCHScmOff
//
CCHMct = nz(CCHMaMcl[CCHMcl2], CCHSrc) + CCHMcmOff
CCHMcb = nz(CCHMaMcl[CCHMcl2], CCHSrc) - CCHMcmOff
//
CCHScmm = math.avg(CCHSct, CCHScb)
//
CCHOmed = (CCHScmm - CCHMcb) / (CCHMct - CCHMcb)
CCHOshort = (CCHSrc - CCHMcb) / (CCHMct - CCHMcb)
//
CCHBc = (CCHOshort > 0.5) ? (CCHOshort > 1.0 ? color.purple : (CCHOshort > CCHOmed ? color.lime : color.green)) : (CCHOshort < 0 ? color.purple : ( CCHOshort < CCHOmed ? color.red : color.orange))
//
// RED ...
CCHFastOSC = CCHOshort
//
// Green ...
CCHSlowOSC = CCHOmed
//
CCHMidOSC = CCHFastOSC >= CCHSlowOSC ? (CCHFastOSC - CCHSlowOSC) / 2 : (CCHSlowOSC - CCHFastOSC) / 2
//
isCCHFastOSCCrossOverCCHSlowOSC = ta.crossover(CCHFastOSC, CCHSlowOSC)
isCCHFastOSCCrossUnderCCHSlowOSC = ta.crossunder(CCHFastOSC, CCHSlowOSC)
//
hasCCHBullishSignal = isCCHFastOSCCrossOverCCHSlowOSC and CCHMidOSC >= 0.02
hasCCHBearishSignal = isCCHFastOSCCrossUnderCCHSlowOSC and CCHMidOSC >= 0.02
//
hasCCHSignal = hasCCHBullishSignal or hasCCHBearishSignal
///////////////////////
// END Cycle Channel
///////////////////////
///////////////////////
// START Strategy ...
///////////////////////
//
canShowStopLoss = showSignals and showStopLosses and (showLongSignals or showShortSignals) and (showLongStopLosses or showShortStopLosses)
canShowLongStopLoss = canShowStopLoss and showLongStopLosses
canShowShortStopLoss = canShowStopLoss and showShortStopLosses
//
canShowTakeProfit = showSignals and showTakeProfits and (showLongSignals or showShortSignals) and (showLongTakeProfits or showShortTakeProfits)
canShowLongTakeProfit = canShowTakeProfit and showLongTakeProfits
canShowShortTakeProfit = canShowTakeProfit and showShortTakeProfits
//
hasSignal = hasCCHSignal
//
stopLossThreshold = 0.0
//
hasLongSignal = hasSignal and hasCCHBullishSignal
longSignal = hasLongSignal ? bar_index : na
longStopLoss = lastMarketLowest
longTakeProfit = open + (open - longStopLoss - stopLossThreshold) * riskRewardRatio
//
hasShortSignal = hasSignal and hasCCHBearishSignal
shortSignal = hasShortSignal ? bar_index : na
shortStopLoss = lastMarketHighest
shortTakeProfit = open + (open - shortStopLoss - stopLossThreshold) * riskRewardRatio
//
canShowSignal = showSignals and (showLongSignals or showShortSignals)
canShowLongSignal = canShowSignal and showLongSignals and hasLongSignal
canShowShortSignal = canShowSignal and showShortSignals and hasShortSignal
///////////////////////
// END Strategy ...
///////////////////////
//
// END Calculations ....
//
//
// START Plots ....
//
//
// Signals ...
plotshape(canShowLongSignal ? longSignal : na, title = "Long Signal", color = longColor, location = location.belowbar, style = shape.triangleup, size = size.small)
plotshape(canShowShortSignal ? shortSignal : na, title = "Short Signal", color = shortColor, location = location.abovebar, style = shape.triangledown, size = size.small)
//
// Stop Losses ...
plot(series = canShowLongStopLoss ? longStopLoss : na, color = longStopLossColor, linewidth = 1, style = plot.style_line, title = "Long Stop Loss")
plot(series = canShowShortStopLoss ? shortStopLoss : na, color = shortStopLossColor, linewidth = 1, style = plot.style_line, title = "Short Stop Loss")
//
// Long Take Profits ...
if hasLongSignal and canShowLongSignal and canShowLongTakeProfit
lTp = line.new(x1 = bar_index, y1 = longTakeProfit, x2 = bar_index + swingLoopback, y2 = longTakeProfit, color = longTakeProfitColor, width = 2, style = line.style_arrow_right)
//
// Short Take Profits ...
if hasShortSignal and canShowShortSignal and canShowShortTakeProfit
sTp = line.new(x1 = bar_index, y1 = shortTakeProfit, x2 = bar_index + swingLoopback, y2 = shortTakeProfit, color = shortTakeProfitColor, width = 2, style = line.style_arrow_right)
//
// END Plots ....
//
//
// START Alerts ...
//
alertcondition(hasSignal, "XST_SCCH15M > Signal")
alertcondition(hasLongSignal, "XST_SCCH15M > Long Signal")
alertcondition(hasShortSignal, "XST_SCCH15M > Short Signal")
//
// END Alerts ...
//
//////////////////////////////////////////////////////
// TODOS:
// -------
// - []
//////////////////////////////////////////////////////
+64
View File
@@ -0,0 +1,64 @@
# Support and Resistance Scalping (XTS_SR15M)
## Setup
- **TF**: 15m
- **Asset**: AAPL
- **R2R**: 1:1.5
- **Indicators**:
- Leledc Levels (IS) InSillico:
- Change Exhaustion bar count to 42;
- Change Line Tickness to 7;
- Hide Support Level line;
- Hide Resistance Level linel;
- ATR Stop Loss garethyeo:
- Change Source to low;
- **Oscillators**:
- Kurutoga Histogram (D7R):
- Hide Kurutuga Lead 4x;
## Descriptions
since Kurutoga Histogram doesn't provides it's source code, i try to implement
Cycle Channel Oscillator, instead of it.
after i try to do back testing usage of CCH and KUH, i found this rules:
- kurutuga histogram green color, means both red and green line in Cycle Channel must be above than 0.5 (Middle) line and green line above than red line.
- kurutuga histogram red color, means both red and green line in Cycle Channel must be below than 0.5 (Middle) line and red line below than green line.
so we have to implement cycle channel oscillator and it's verifications on signals ...
## Using the Strategy
### Long/Buy Conditions
- Leledc Level gives **Support Signal** (green to up side triangle);
- kurutuga histogram is **red** color;
- market forms a **bullish** candle;
#### Long SL
place sl at low of ATR Stop Loss Purple(red) Line.
#### Long TP
calculate based on R2R;
### Short/Sell Conditions
- Leledc Level gives **Resistance Signal** (red to down side triangle);
- kurutuga histogram is **green** color;
- market forms a **bearish** candle;
#### Short SL
place sl at high of ATR Stop Loss Green Line.
#### Short TP
calculate based on R2R;
### Signals Overlap
how to handle signals overlaps.
+67
View File
@@ -0,0 +1,67 @@
# XST_SR15M
## Report 1
### Makret
ETHUSDT
### Exchange
Kucoin
### Time Frame
15min
### Start Date
24 april 2023 | 01:15
### End Date
18 may 2023 | 14:45
### Risk to Reward
1:1.5
### Reports
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | x | | |
| 2 | Short | | x | |
| 3 | Short | x | | |
| 4 | Short | | x | |
| 5 | Short | | x | |
| 6 | Short | x | | |
| 7 | Short | | x | |
| 8 | Short | x | | |
| 9 | Short | | x | |
| 10 | Long | x | | |
| 11 | Long | x | | |
| 12 | Long | | x | |
| 13 | Long | | x | |
| 14 | Long | x | | |
| 15 | Long | x | | |
| 16 | Long | | x | |
| 17 | Long | x | | |
| 18 | Long | | x | |
| 19 | Long | x | | |
| 20 | Long | x | | |
| 21 | Long | | x | |
#### Signals Results
| Type | Count | TPs | SLs |
| :-: | :-: | :-: | :-: |
| Shorts | 9 | 4 | 5 |
| Longs | 12 | 7 | 5 |
| Total | 21 | 11 | 10 |
#### Analysis
per trade volume: 10$
total spending: 210$
total comeback: 165$
+353
View File
@@ -0,0 +1,353 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center XTrade SR15M Strategy
// ---------------------------------------------
// in this strategy i must use:
// - Price Action Candle Recognition;
// - Leledc Levels (IS) InSillico;
// - ATR Stop Loss garethyeo;
// - Cycle Channel Oscillator;
//
// Maintainer:
// ------------
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
//
//////////////////////////////////////////////////////
//
//@version=5
indicator(title="SaherElm XTrade SR15M Strategy", shorttitle = "XST_SR15M", overlay = true)
//
// START Inputs ....
//
//
// Determines Show Signals or not ...
showSignals = input.bool(defval = true, title = "Show Signals", group = "Strategy")
showStopLosses = input.bool(defval = true, title = "Show Stop Losses", group = "Strategy")
showSupportResistance = input.bool(defval = false, title = "Show Support and Resistance", group = "Strategy")
//
// Show Signals based on their types ...
showLongSignals = input.bool(defval = true, title = "Show Long Signals", group = "Signals")
showShortSignals = input.bool(defval = true, title = "Show Short Signals", group = "Signals")
//
// Show Stop Losses based on their types ...
showLongStopLosses = input.bool(defval = true, title = "Show Long Stop Losses", group = "Stop Loss")
showShortStopLosses = input.bool(defval = true, title = "Show Short Stop Losses", group = "Stop Loss")
//
// END Inputs ....
//
//
// START Functions ....
//
//////////////////////////////
// START Price Action Candles
//////////////////////////////
//
// Retrieve Specific Candle Height (based on low and high) ...
getCandleRange() =>
high - low
//
// Retrieve Candle Ranges Thirs Section ...
getCandleThird() =>
getCandleRange() / 3
//
// Determines a Candle is Bullish or not ...
isBullishCandle() =>
close > low + (getCandleThird() * 2)
//
// Determines a Candle is Bearish or not ...
isNeutralCandle() =>
close < low + (getCandleThird() * 2) and close > low + getCandleThird()
//
// Determines a Candle is Neutral or not ...
isBearishCandle() =>
close < low + getCandleThird()
/////////////////////////////
// END Price Action Candles
/////////////////////////////
///////////////////////
// START Leledc Levels
///////////////////////
//
Lelec(bars, len) =>
//
result = 0
bindex = int(na)
bindex := nz(bindex[1], 0)
sindex = int(na)
sindex := nz(sindex[1], 0)
//
bindex := close > close[4] ? bindex + 1 : bindex
sindex := close < close[4] ? sindex + 1 : sindex
//
lowest = ta.lowest(low, len)
highest = ta.highest(high, len)
//
if bindex > bars and close < open and high >= highest
bindex := 0
result := -1
result
else
if sindex > bars and close > open and low <= lowest
sindex := 0
result := 1
result
///////////////////////
// END Leledc Levels
///////////////////////
//
// END Functions ....
//
//
// START Calculations ....
//
//
var shortColor = color.red
var longColor = color.lime
//////////////////////////////
// START Price Action Candles
//////////////////////////////
//
var bullishColor = color.lime
var bullishShape = shape.arrowup
var bullishTitle = "Bullish"
var bullishType = 1
//
var bearishColor = color.red
var bearishShape = shape.arrowdown
var bearishTitle = "Bearish"
var bearishType = -1
//
var neutralColor = color.gray
var neutralShape = shape.circle
var neutralTitle = "Neutral"
var neutralType = 0
//
candleType = isBullishCandle() ? bullishType : isNeutralCandle() ? neutralType : isBearishCandle() ? bearishType : neutralType
//
prevCandleType = not na(candleType[1]) ? candleType[1] : neutralType
//
candleNeighborhoodBaseType = prevCandleType + candleType
/////////////////////////////
// END Price Action Candles
/////////////////////////////
///////////////////////
// START Leledc Levels
///////////////////////
//
LLBars = 42
LLLength = 40
LLLevelSwitch = true
LLThicknesSwitch = 7
LLExhaustionSwitch = true
//
// Out C ...
Lelex = Lelec(LLBars, LLLength)
//
// Out Bar ...
LLHighLel = Lelex == -1 ? high : na
LLLowLel = Lelex == 1 ? low : na
//
// Out level ...
LLResistance = float(na)
LLSupport = float(na)
LLResistance := close < open and Lelex ? high : LLResistance[1]
LLSupport := close > open and Lelex ? low : LLSupport[1]
//
// Resistance Color ...
LLResistanceColor = shortColor
LLHighColor = ta.change(LLResistance) == 0 ? LLResistanceColor : na
//
// Support Color ...
LLSupportColor = longColor
LLLowColor = ta.change(LLSupport) == 0 ? LLSupportColor : na
//
// Has Signal ...
LLHasSignal = LLExhaustionSwitch
//
// Up Signals ...
LLUpSignal = LLHasSignal ? LLLowLel : na
//
// Down Signals ...
LLDownSignal = LLHasSignal ? LLHighLel : na
///////////////////////
// END Leledc Levels
///////////////////////
///////////////////////
// START ATR Stop Loss
///////////////////////
//
ATRSLSource = low
ATRSLLength = 14
ATRSLMultiplier = 1.6
//
ATRSLLongStopLoss = ATRSLSource - ta.atr(ATRSLLength) * ATRSLMultiplier
ATRSLShortStopLoss = ATRSLSource + ta.atr(ATRSLLength) * ATRSLMultiplier
///////////////////////
// END ATR Stop Loss
///////////////////////
///////////////////////
// START Cycle Channel
///////////////////////
//
CCHSclT = 10
CCHMclT = 30
CCHScm = 1.0
CCHMcm = 3.0
CCHSrc = close
CCHEbc = false
//
CCHScl = CCHSclT / 2
CCHMcl = CCHMclT / 2
//
CCHMaScl = ta.rma(CCHSrc, CCHScl)
CCHMaMcl = ta.rma(CCHSrc, CCHMcl)
//
CCHScmOff = CCHScm * ta.atr(CCHScl)
CCHMcmOff = CCHMcm * ta.atr(CCHMcl)
//
CCHScl2 = CCHScl / 2
CCHMcl2 = CCHMcl / 2
//
CCHSct = nz(CCHMaScl[CCHScl2], CCHSrc) + CCHScmOff
CCHScb = nz(CCHMaScl[CCHScl2], CCHSrc) - CCHScmOff
//
CCHMct = nz(CCHMaMcl[CCHMcl2], CCHSrc) + CCHMcmOff
CCHMcb = nz(CCHMaMcl[CCHMcl2], CCHSrc) - CCHMcmOff
//
CCHScmm = math.avg(CCHSct, CCHScb)
//
CCHOmed = (CCHScmm - CCHMcb) / (CCHMct - CCHMcb)
CCHOshort = (CCHSrc - CCHMcb) / (CCHMct - CCHMcb)
//
CCHBc = (CCHOshort > 0.5) ? (CCHOshort > 1.0 ? color.purple : (CCHOshort > CCHOmed ? color.lime : color.green)) : (CCHOshort < 0 ? color.purple : ( CCHOshort < CCHOmed ? color.red : color.orange))
///////////////////////
// END Cycle Channel
///////////////////////
///////////////////////
// START Strategy ...
///////////////////////
//
canShowStopLoss = showSignals and showStopLosses and (showLongSignals or showShortSignals) and (showLongStopLosses or showShortStopLosses)
canShowLongStopLoss = canShowStopLoss and showLongStopLosses and not na(ATRSLLongStopLoss)
canShowShortStopLoss = canShowStopLoss and showShortStopLosses and not na(ATRSLShortStopLoss)
//
// retrieve verification from CCH ...
//
// Red Line ...
fastLine = CCHOshort
// plot(fastLine, color = color.red)
//
// Green Line ...
slowLine = CCHOmed
// plot(slowLine, color = color.green)
//
// CCH Long Verification ...
isLongPositionVerifiedByCCH = fastLine < 0.5 and slowLine < 0.5 and fastLine < slowLine
//
// CCH Short Verification ...
isShortPositionVerifiedByCCH = fastLine > 0.5 and slowLine > 0.5 and fastLine > slowLine
//
hasSignal = LLHasSignal
//
hasLongSignal = hasSignal and not na(LLUpSignal) and isLongPositionVerifiedByCCH and isBullishCandle()
longSignal = hasLongSignal ? LLUpSignal : na
//
hasShortSignal = hasSignal and not na(LLDownSignal) and isShortPositionVerifiedByCCH and isBearishCandle()
shortSignal = hasShortSignal ? LLDownSignal : na
//
canShowSignal = showSignals and (showLongSignals or showShortSignals)
canShowLongSignal = canShowSignal and showLongSignals and hasLongSignal
canShowShortSignal = canShowSignal and showShortSignals and hasShortSignal
///////////////////////
// END Strategy ...
///////////////////////
//
// END Calculations ....
//
//
// START Plots ....
//
//
// Signals ...
plotshape(canShowLongSignal ? longSignal : na, title = "Long Signal", color = longColor, location = location.belowbar, style = shape.triangleup, size = size.normal)
plotshape(canShowShortSignal ? shortSignal : na, title = "Short Signal", color = shortColor, location = location.abovebar, style = shape.triangledown, size = size.normal)
//
// Stop Losses ...
plot(series = canShowLongStopLoss ? ATRSLLongStopLoss : na, color = color.fuchsia, linewidth = 1, style = plot.style_stepline, title = "Long Stop Loss")
plot(series = canShowShortStopLoss ? ATRSLShortStopLoss : na, color = color.aqua, linewidth = 1, style = plot.style_stepline, title = "Short Stop Loss")
//
// Support and Resistance level ...
plot(showSupportResistance and LLLevelSwitch ? LLSupport : na, title = "Support Level", style = plot.style_line, color = LLLowColor, linewidth = LLThicknesSwitch)
plot(showSupportResistance and LLLevelSwitch ? LLResistance : na, title = "Reistance Level", style = plot.style_line, color = LLHighColor, linewidth = LLThicknesSwitch)
//
// END Plots ....
//
//
// START Alerts ...
//
alertcondition(hasSignal, "XST_SR15M > Signal")
alertcondition(hasLongSignal, "XST_SR15M > Long Signal")
alertcondition(hasShortSignal, "XST_SR15M > Short Signal")
//
// END Alerts ...
//
//////////////////////////////////////////////////////
// TODOS:
// -------
// - []
//////////////////////////////////////////////////////
+43
View File
@@ -0,0 +1,43 @@
# Trend Magic Scalping (TM15M)
## Setup
- **TF**: 15m
- **Asset**: AAPL
- **R2R**: 1:1.1
- **Indicators**:
- :
- ;
- **Oscillators**:
- :
- ;
## Using the Strategy
### Long/Buy Conditions
- ;
#### Long SL
place sl at prev MArket lowest
#### Long TP
calculate based on R2R;
### Short/Sell Conditions
- ;
#### Short SL
place sl at prev market highest;
#### Short TP
calculate based on R2R;
### Signals Overlap
how to handle signals overlaps.
@@ -0,0 +1,93 @@
# XST_SR15M
## Report
### Makret
ETHUSDT
### Exchange
Kucoin
### Time Frame
15min
### Start Date
13 march 2023 | 14:00
### End Date
21 may 2023 | 15:00
### Risk to Reward
1:1.5
### Reports
#### Longs
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Long | x | | |
| 2 | Long | x | | |
| 3 | Long | | X | |
| 4 | Long | | x | |
| 5 | Long | x | | |
| 6 | Long | | x | |
| 7 | Long | | x | |
| 8 | Long | x | | |
| 9 | Long | | x | |
| 10 | Long | x | | |
| 11 | Long | | x | |
| 12 | Long | | x | |
| 13 | Long | | x | |
| 14 | Long | | x | |
| 15 | Long | x | | |
| 16 | Long | | | |
| 17 | Long | | | |
| 18 | Long | | | |
| 19 | Long | | | |
| 20 | Long | | | |
#### Shorts
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | | x | |
| 2 | Short | | x | |
| 3 | Short | | x | |
| 4 | Short | | | |
| 5 | Short | | | |
| 6 | Short | | | |
| 7 | Short | | | |
| 8 | Short | | | |
| 9 | Short | | | |
| 10 | Short | | | |
| 11 | Short | | | |
| 12 | Short | | | |
| 13 | Short | | | |
| 14 | Short | | | |
| 15 | Short | | | |
| 16 | Short | | | |
| 17 | Short | | | |
| 18 | Short | | | |
| 19 | Short | | | |
| 20 | Short | | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :-: | :-: | :-: | :-: |
| Shorts | | 4 | 5 |
| Longs | 12 | 7 | 5 |
| Total | 21 | 11 | 10 |
#### Analysis
per trade volume: 10$
total spending: 210$
total comeback: 165$
+93
View File
@@ -0,0 +1,93 @@
# XST_SR15M
## Report 1
### Makret
ETHUSDT
### Exchange
Kucoin
### Time Frame
15min
### Start Date
15 may 2023 | 01:30
### End Date
21 may 2023 | 15:00
### Risk to Reward
1:1.5
### Reports
#### Longs
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Long | x | | |
| 2 | Long | x | | |
| 3 | Long | x | | |
| 4 | Long | | x | |
| 5 | Long | x | | |
| 6 | Long | x | | |
| 7 | Long | x | | |
| 8 | Long | x | | |
| 9 | Long | x | | |
| 10 | Long | | x | |
| 11 | Long | | x | |
| 12 | Long | x | | |
| 13 | Long | x | | |
| 14 | Long | x | | |
| 15 | Long | | x | |
| 16 | Long | x | | |
| 17 | Long | | x | |
| 18 | Long | x | | |
| 19 | Long | | x | |
| 20 | Long | | x | |
#### Shorts
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | | x | Open |
| 2 | Short | x | | |
| 3 | Short | x | | |
| 4 | Short | x | | |
| 5 | Short | | x | |
| 6 | Short | x | | |
| 7 | Short | x | | |
| 8 | Short | | x | |
| 9 | Short | x | | |
| 10 | Short | x | | |
| 11 | Short | | | |
| 12 | Short | | | |
| 13 | Short | | | |
| 14 | Short | | | |
| 15 | Short | | | |
| 16 | Short | | | |
| 17 | Short | | | |
| 18 | Short | | | |
| 19 | Short | | | |
| 20 | Short | | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :-: | :-: | :-: | :-: |
| Shorts | | 4 | 5 |
| Longs | 12 | 7 | 5 |
| Total | 21 | 11 | 10 |
#### Analysis
per trade volume: 10$
total spending: 210$
total comeback: 165$
+340
View File
@@ -0,0 +1,340 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center XTrade TM15M Strategy
// ---------------------------------------------
// in this strategy i must use:
// - ;
//
// Maintainer:
// ------------
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
//
//////////////////////////////////////////////////////
//
//@version=5
indicator(title="SaherElm XTrade TM15M Strategy", shorttitle = "XST_TM15M", overlay = true)
//
// START Inputs ....
//
//
showTrendMagic = input.bool(defval = false, title = "Show Trend Magic")
//
// Determines Show Signals or not ...
showSignals = input.bool(defval = true, title = "Show Signals", group = "Strategy")
showStopLosses = input.bool(defval = true, title = "Show Stop Losses", group = "Strategy")
//
// Show Signals based on their types ...
showLongSignals = input.bool(defval = true, title = "Show Long Signals", group = "Signals")
showShortSignals = input.bool(defval = true, title = "Show Short Signals", group = "Signals")
//
// Show Stop Losses based on their types ...
swingLoopback = input.int(defval = 7, title = "Swing Loopback Period", group = "Stop Loss")
showLongStopLosses = input.bool(defval = true, title = "Show Long Stop Losses", group = "Stop Loss")
showShortStopLosses = input.bool(defval = true, title = "Show Short Stop Losses", group = "Stop Loss")
//
// END Inputs ....
//
//
// START Functions ....
//
//////////////////////////////
// START Price Action Candles
//////////////////////////////
//
// Retrieve Specific Candle Height (based on low and high) ...
getCandleRange() =>
high - low
//
// Retrieve Candle Ranges Thirs Section ...
getCandleThird() =>
getCandleRange() / 3
//
// Determines a Candle is Bullish or not ...
isBullishCandle() =>
close > low + (getCandleThird() * 2)
//
// Determines a Candle is Bearish or not ...
isNeutralCandle() =>
close < low + (getCandleThird() * 2) and close > low + getCandleThird()
//
// Determines a Candle is Neutral or not ...
isBearishCandle() =>
close < low + getCandleThird()
/////////////////////////////
// END Price Action Candles
/////////////////////////////
//
// END Functions ....
//
//
// START Calculations ....
//
//
var shortColor = color.red
var longColor = color.lime
//////////////////////////////
// START Price Action Candles
//////////////////////////////
//
var bullishColor = color.lime
var bullishShape = shape.arrowup
var bullishTitle = "Bullish"
var bullishType = 1
//
var bearishColor = color.red
var bearishShape = shape.arrowdown
var bearishTitle = "Bearish"
var bearishType = -1
//
var neutralColor = color.gray
var neutralShape = shape.circle
var neutralTitle = "Neutral"
var neutralType = 0
//
candleType = isBullishCandle() ? bullishType : isNeutralCandle() ? neutralType : isBearishCandle() ? bearishType : neutralType
//
prevCandleType = not na(candleType[1]) ? candleType[1] : neutralType
//
candleNeighborhoodBaseType = prevCandleType + candleType
/////////////////////////////
// END Price Action Candles
/////////////////////////////
////////////////////////////
// START Last Market Price
////////////////////////////
//
lastMarketLowest = ta.lowest(low, swingLoopback)
lastMarketLowest2 = ta.lowest(low, swingLoopback * 2)
lastMarketLowest3 = ta.lowest(low, swingLoopback * 3)
//
lastMarketHighest = ta.highest(high, swingLoopback)
lastMarketHighest2 = ta.highest(high, swingLoopback * 2)
lastMarketHighest3 = ta.highest(high, swingLoopback * 3)
////////////////////////////
// END Last Market Price
////////////////////////////
////////////////////////////
// START Trend Magic ...
////////////////////////////
TMAP = 5
TMCoeff = 1
TMPeriod = 20
TMSrc = close
//
TMATR = ta.sma(ta.tr,TMAP)
//
TMUpT = low - TMATR * TMCoeff
TMDownT = high + TMATR * TMCoeff
//
TMMagicTrend = 0.0
TMMagicTrend := ta.cci(TMSrc, TMPeriod) >= 0 ? (TMUpT < nz(TMMagicTrend[1]) ? nz(TMMagicTrend[1]) : TMUpT) : (TMDownT > nz(TMMagicTrend[1]) ? nz(TMMagicTrend[1]) : TMDownT)
//
// Check Candle State based on TMMagic Trend ...
TMCandleState = ta.cci(TMSrc, TMPeriod)
//
TMTrendUp = TMCandleState > 0
TMTrendDown = TMCandleState < 0
TMTrendNeutral = TMCandleState == 0
//
TMTrendDiff = TMMagicTrend - TMMagicTrend[1]
// plot(series = TMTrendDiff, color = color.yellow)
// //
// TMTrendNeutral = TMTrendDiff == 0
// TMTrendIncreased = TMTrendDiff > 0
// TMTrendDecreased = TMTrendDiff < 0
//
TMTrendChanged = TMTrendUp and not TMTrendUp[1] or not TMTrendUp and TMTrendUp[1]
//
TMColor = TMTrendUp ? color.blue : TMTrendDown ? color.red : TMTrendNeutral ? color.gray : na
////////////////////////////
// END Trend Magic ...
////////////////////////////
///////////////////////
// START Cycle Channel
///////////////////////
//
CCHSclT = 10
CCHMclT = 30
CCHScm = 1.0
CCHMcm = 3.0
CCHSrc = close
CCHEbc = false
//
CCHScl = CCHSclT / 2
CCHMcl = CCHMclT / 2
//
CCHMaScl = ta.rma(CCHSrc, CCHScl)
CCHMaMcl = ta.rma(CCHSrc, CCHMcl)
//
CCHScmOff = CCHScm * ta.atr(CCHScl)
CCHMcmOff = CCHMcm * ta.atr(CCHMcl)
//
CCHScl2 = CCHScl / 2
CCHMcl2 = CCHMcl / 2
//
CCHSct = nz(CCHMaScl[CCHScl2], CCHSrc) + CCHScmOff
CCHScb = nz(CCHMaScl[CCHScl2], CCHSrc) - CCHScmOff
//
CCHMct = nz(CCHMaMcl[CCHMcl2], CCHSrc) + CCHMcmOff
CCHMcb = nz(CCHMaMcl[CCHMcl2], CCHSrc) - CCHMcmOff
//
CCHScmm = math.avg(CCHSct, CCHScb)
//
CCHOmed = (CCHScmm - CCHMcb) / (CCHMct - CCHMcb)
CCHOshort = (CCHSrc - CCHMcb) / (CCHMct - CCHMcb)
//
CCHSlowOSC = CCHOmed
CCHFastOSC = CCHOshort
//
CCHMidPoint = 0.5
isCCHUpTrend = CCHFastOSC > CCHMidPoint
isCCHDownTrend = CCHFastOSC < CCHMidPoint
CCHTrendUp = ta.crossover(CCHFastOSC, CCHMidPoint)
CCHTrendDown = ta.crossunder(CCHFastOSC, CCHMidPoint)
CCHTrendBullish = ta.crossover(CCHFastOSC, CCHSlowOSC) and isBullishCandle()
//
CCHFastOSCDiff = CCHFastOSC - CCHFastOSC[1]
CCHSlowOSCDiff = CCHSlowOSC - CCHSlowOSC[1]
// plot(CCHFastOSCDiff, color = color.fuchsia)
// plot(CCHSlowOSCDiff, color =color.yellow)
// isFastOSCDiffPassed = true // CCHFastOSCDiff < 0 and CCHFastOSCDiff < -0.07
// isSlowOSCDiffPassed = true // CCHSlowOSCDiff > 0 and CCHSlowOSCDiff <= 0.03
//
// lastMarketRange = lastMarketHighest - TMMagicTrend
// candleRangeInLastMarket = math.abs(lastMarketRange - getCandleRange())
// isCandleVerifiedInTrendClopud = lastMarketRange > getCandleRange() and candleRangeInLastMarket >= lastMarketRange / 2
// isCandleRageVerified =
// plot(lastMarketRange, color = color.maroon)
// plot(candleRangeInLastMarket, color = color.rgb(11, 108, 199))
CCHTrendBearish = ta.crossunder(CCHFastOSC, CCHSlowOSC) and isBearishCandle() and low < TMMagicTrend and high < TMMagicTrend // and isCandleVerifiedInTrendClopud // and isFastOSCDiffPassed and isSlowOSCDiffPassed
//
CCHBc = (CCHOshort > 0.5) ? (CCHOshort > 1.0 ? color.purple : (CCHOshort > CCHOmed ? color.lime : color.green)) : (CCHOshort < 0 ? color.purple : ( CCHOshort < CCHOmed ? color.red : color.orange))
///////////////////////
// END Cycle Channel
///////////////////////
///////////////////////
// START Strategy ...
///////////////////////
//
canShowStopLoss = showSignals and showStopLosses and (showLongSignals or showShortSignals) and (showLongStopLosses or showShortStopLosses)
canShowLongStopLoss = canShowStopLoss and showLongStopLosses // and not na(ATRSLLongStopLoss)
canShowShortStopLoss = canShowStopLoss and showShortStopLosses // and not na(ATRSLShortStopLoss)
//
hasSignal = TMTrendUp and CCHTrendUp or CCHTrendBearish // (TMTrendDown and CCHTrendDown)
//
hasLongSignal = hasSignal and TMTrendUp and CCHTrendUp and TMTrendDiff[1] >= 0// and open < TMMagicTrend //and (close < TMMagicTrend) and isBullishCandle()
longSignal = hasLongSignal ? bar_index : na
float longStopLoss = lastMarketLowest
//
hasShortSignal = hasSignal and CCHTrendBearish // and TMTrendDown and open > TMMagicTrend // and close > TMMagicTrend) and isBearishCandle()
shortSignal = hasShortSignal ? bar_index : na
float shortStopLoss = lastMarketHighest
//
canShowSignal = showSignals and (showLongSignals or showShortSignals)
canShowLongSignal = canShowSignal and showLongSignals and hasLongSignal
canShowShortSignal = canShowSignal and showShortSignals and hasShortSignal
///////////////////////
// END Strategy ...
///////////////////////
//
// END Calculations ....
//
//
// START Plots ....
//
//
// Trend Magic ...
plot(series = showTrendMagic ? TMMagicTrend : na, color = TMColor, linewidth = 3, title = "TM > Trend Magic")
//
// CCH Trend Signals ...
// plotshape(CCHTrendUp ? bar_index : na, title = "CCH > Trend Up", location = location.belowbar ,style = shape.arrowup, size = size.normal, color = color.green)
// plotshape(CCHTrendBullish ? bar_index : na, title = "CCH > Trend Bullish", location = location.belowbar ,style = shape.arrowup, size = size.normal, color = color.aqua)
// plotshape(CCHTrendDown ? bar_index : na, title = "CCH > Trend Down", location = location.abovebar, style = shape.arrowdown, size = size.normal, color = color.red)
// plotshape(CCHTrendBearish ? bar_index : na, title = "CCH > Trend Bearish", location = location.abovebar, style = shape.arrowdown, size = size.normal, color = color.purple)
//
// TM Trend Signals ...
// plotshape(TMTrendUp ? bar_index : na, title = "TM > Trend Up", location = location.belowbar ,style = shape.labelup, size = size.normal, color = color.green)
// plotshape(TMTrendDown ? bar_index : na, title = "TM > Trend Down", location = location.abovebar, style = shape.labeldown, size = size.normal, color = color.red)
//
// Signals ...
plotshape(canShowLongSignal ? longSignal : na, title = "Long Signal", color = longColor, location = location.belowbar, style = shape.triangleup, size = size.normal)
plotshape(canShowShortSignal ? shortSignal : na, title = "Short Signal", color = shortColor, location = location.abovebar, style = shape.triangledown, size = size.normal)
//
// Stop Losses ...
plot(series = canShowLongStopLoss ? longStopLoss : na, color = color.fuchsia, linewidth = 1, style = plot.style_stepline, title = "Long Stop Loss")
plot(series = canShowShortStopLoss ? shortStopLoss : na, color = color.aqua, linewidth = 1, style = plot.style_stepline, title = "Short Stop Loss")
//
// END Plots ....
//
//
// START Alerts ...
//
alertcondition(hasSignal, "XST_SHULL5M > Signal")
alertcondition(hasLongSignal, "XST_SHULL5M > Long Signal")
alertcondition(hasShortSignal, "XST_SHULL5M > Short Signal")
//
// END Alerts ...
//
//////////////////////////////////////////////////////
// TODOS:
// -------
// - []
//////////////////////////////////////////////////////
@@ -0,0 +1,54 @@
# Trend Magic Scalping (TMPLMCD5M)
## Setup
- **TF**: 5m
- **Asset**: TSLA
- **R2R**: 1:2
- **Indicators**:
- Trend Magic (KivancQzbilgic):
- Change Plot Blue color to Green;
- Change CCI Period to 18;
- **Oscillators**:
- Impulse MACD by LazyBear:
- Change ImpulseMACD shows as Columns;
- Change ImpulseMACD Color 3 to Red;
- Change Color of ImpulsHisto to Yellow;
## Using the Strategy
### Long/Buy Conditions
- ImpulseMACD gives Green DownSide (Reversal);
- ImpulseMACD Green Column is above of ImpulseMACD signal line;
- ImpulseHisto Yellow is above MACD green Bar (above zero line);
- TrendMagic is Green;
- Market froms a Bullish Candle;
#### Long SL
place sl at prev MArket lowest
#### Long TP
calculate based on R2R;
### Short/Sell Conditions
- ImpulseMACD gives Red UpSide (Reversal);
- ImpulseMACD Red Column is below of ImpulseMACD signal line;
- ImpulseHisto Yellow is below MACD Red Bar (below zero line);
- TrendMagic is Red;
- Market froms a Berish Candle;
#### Short SL
place sl at prev market highest;
#### Short TP
calculate based on R2R;
### Signals Overlap
how to handle signals overlaps.
@@ -0,0 +1,96 @@
# XST_TMPLMCD5M
## Report
### Makret
BTCUSDT.P
### Exchange
OKX
### Time Frame
5min
### Start Date
19 may 2023 | 03:20 UTC
### End Date
22 may 2023 | 15:10 UTC
### Risk to Reward
1:2
### Reports
#### Longs
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Long | | x | |
| 2 | Long | | x | |
| 3 | Long | | x | |
| 4 | Long | x | | |
| 5 | Long | x | | |
| 6 | Long | x | | |
| 7 | Long | | x | |
| 8 | Long | x | | |
| 9 | Long | | | |
| 10 | Long | | | |
| 11 | Long | | | |
| 12 | Long | | | |
| 13 | Long | | | |
| 14 | Long | | | |
| 15 | Long | | | |
| 16 | Long | | | |
| 17 | Long | | | |
| 18 | Long | | | |
| 19 | Long | | | |
| 20 | Long | | | |
#### Shorts
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | | | Open |
| 2 | Short | x | | |
| 3 | Short | x | | |
| 4 | Short | | x | |
| 5 | Short | | x | |
| 6 | Short | | x | |
| 7 | Short | | x | |
| 8 | Short | x | | |
| 9 | Short | x | | |
| 10 | Short | | x | |
| 11 | Short | x | | |
| 12 | Short | | x | |
| 13 | Short | | | |
| 14 | Short | | | |
| 15 | Short | | | |
| 16 | Short | | | |
| 17 | Short | | | |
| 18 | Short | | | |
| 19 | Short | | | |
| 20 | Short | | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :----: | :-: | :-: | :-: |
| Longs | 08 | 04 | 04 |
| Shorts | 12 | 05 | 06 | 1 OPEN
| Total | 00 | 00 | 00 |
#### Analysis
per trade volume: 10$
total drawdown: 200$
total lose: 100$
total reward: 180$
total cash: 100$ + 180$ = 280$
win rate: 40%
@@ -0,0 +1,96 @@
# XST_TMPLMCD5M
## Report
### Makret
ETHUSDT
### Exchange
Kucoin
### Time Frame
5min
### Start Date
14 may 2023 | 07:25 UTC
### End Date
22 may 2023 | 08:55 UTC
### Risk to Reward
1:2
### Reports
#### Longs
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Long | x | | |
| 2 | Long | | x | |
| 3 | Long | x | | |
| 4 | Long | | x | |
| 5 | Long | | x | |
| 6 | Long | | x | |
| 7 | Long | | x | |
| 8 | Long | x | | |
| 9 | Long | | | |
| 10 | Long | | | |
| 11 | Long | | | |
| 12 | Long | | | |
| 13 | Long | | | |
| 14 | Long | | | |
| 15 | Long | | | |
| 16 | Long | | | |
| 17 | Long | | | |
| 18 | Long | | | |
| 19 | Long | | | |
| 20 | Long | | | |
#### Shorts
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | | x | |
| 2 | Short | x | | |
| 3 | Short | x | | |
| 4 | Short | | x | |
| 5 | Short | x | | |
| 6 | Short | | x | |
| 7 | Short | x | | |
| 8 | Short | x | | |
| 9 | Short | x | | |
| 10 | Short | x | | |
| 11 | Short | | x | |
| 12 | Short | x | | |
| 13 | Short | | | |
| 14 | Short | | | |
| 15 | Short | | | |
| 16 | Short | | | |
| 17 | Short | | | |
| 18 | Short | | | |
| 19 | Short | | | |
| 20 | Short | | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :----: | :-: | :-: | :-: |
| Longs | 08 | 03 | 05 |
| Shorts | 12 | 08 | 04 |
| Total | 20 | 11 | 09 |
#### Analysis
per trade volume: 10$
total drawdown: 200$
total lose: 90$
total reward: 220$
total cash: 110$ + 220$ = 330$
win rate: 65%
@@ -0,0 +1,100 @@
# XST_TMPLMCD5M
## Report
### Makret
Micro Strategy
### Exchange
NASDAQ
### Time Frame
5min
### Start Date
14 Feb 2023 | 14:30 UTC
### End Date
18 may 2023 | 18:45 UTC
### Risk to Reward
1:2
### Reports
#### Longs
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Long | x | | |
| 2 | Long | x | | |
| 3 | Long | x | | |
| 4 | Long | x | | |
| 5 | Long | | x | |
| 6 | Long | x | | |
| 7 | Long | | x | |
| 8 | Long | | x | |
| 9 | Long | | x | |
| 10 | Long | | x | |
| 11 | Long | x | | |
| 12 | Long | x | | |
| 13 | Long | | x | |
| 14 | Long | | x | |
| 15 | Long | x | | |
| 16 | Long | x | | |
| 17 | Long | | x | |
| 18 | Long | | x | |
| 19 | Long | | x | |
| 20 | Long | | x | |
| 21 | Long | | x | |
| 22 | Long | | x | |
#### Shorts
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | x | | |
| 2 | Short | | x | |
| 3 | Short | | x | |
| 4 | Short | | x | |
| 5 | Short | | x | |
| 6 | Short | x | | |
| 7 | Short | | x | |
| 8 | Short | | x | |
| 9 | Short | | x | |
| 10 | Short | x | | |
| 11 | Short | | x | |
| 12 | Short | | x | |
| 13 | Short | | x | |
| 14 | Short | | x | |
| 15 | Short | | x | |
| 16 | Short | | x | |
| 17 | Short | x | | |
| 18 | Short | x | | |
| 19 | Short | x | | |
| 20 | Short | | x | |
| 21 | Short | | x | |
| 22 | Short | x | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :----: | :-: | :-: | :-: |
| Longs | 22 | 09 | 13 |
| Shorts | 22 | 07 | 15 |
| Total | 44 | 16 | 28 |
#### Analysis
per trade volume: 10$
total drawdown: 440$
total lose: 280$
total reward: 320$
total cash: 480$
win rate: 9.09%
@@ -0,0 +1,96 @@
# XST_TMPLMCD5M
## Report
### Makret
TSLA
### Exchange
NASDAQ
### Time Frame
5min
### Start Date
10 mar 2023 | 15:05 UTC
### End Date
16 may 2023 | 14:25 UTC
### Risk to Reward
1:2
### Reports
#### Longs
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Long | x | | |
| 2 | Long | x | | |
| 3 | Long | | x | |
| 4 | Long | | x | |
| 5 | Long | | | |
| 6 | Long | | | |
| 7 | Long | | | |
| 8 | Long | | | |
| 9 | Long | | | |
| 10 | Long | | | |
| 11 | Long | | | |
| 12 | Long | | | |
| 13 | Long | | | |
| 14 | Long | | | |
| 15 | Long | | | |
| 16 | Long | | | |
| 17 | Long | | | |
| 18 | Long | | | |
| 19 | Long | | | |
| 20 | Long | | | |
#### Shorts
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | x | | |
| 2 | Short | | x | |
| 3 | Short | x | | |
| 4 | Short | x | | |
| 5 | Short | | x | |
| 6 | Short | | x | |
| 7 | Short | | | |
| 8 | Short | | | |
| 9 | Short | | | |
| 10 | Short | | | |
| 11 | Short | | | |
| 12 | Short | | | |
| 13 | Short | | | |
| 14 | Short | | | |
| 15 | Short | | | |
| 16 | Short | | | |
| 17 | Short | | | |
| 18 | Short | | | |
| 19 | Short | | | |
| 20 | Short | | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :----: | :-: | :-: | :-: |
| Longs | 04 | 02 | 02 |
| Shorts | 06 | 03 | 03 |
| Total | 10 | 05 | 05 |
#### Analysis
per trade volume: 10$
total drawdown: 100$
total lose: 50$
total reward: 100$
total cash: 150$
win rate: 50%
@@ -0,0 +1,96 @@
# XST_TMPLMCD5M
## Report
### Makret
XAUUSD
### Exchange
Forex.com
### Time Frame
5min
### Start Date
1 may 2023 | 13:45 UTC
### End Date
22 may 2023 | 06:30 UTC
### Risk to Reward
1:2
### Reports
#### Longs
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Long | | x | |
| 2 | Long | x | | |
| 3 | Long | | x | |
| 4 | Long | | x | |
| 5 | Long | | x | |
| 6 | Long | x | | |
| 7 | Long | | x | |
| 8 | Long | x | | |
| 9 | Long | | x | |
| 10 | Long | x | | |
| 11 | Long | | x | |
| 12 | Long | | | |
| 13 | Long | | | |
| 14 | Long | | | |
| 15 | Long | | | |
| 16 | Long | | | |
| 17 | Long | | | |
| 18 | Long | | | |
| 19 | Long | | | |
| 20 | Long | | | |
#### Shorts
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | x | | |
| 2 | Short | | x | |
| 3 | Short | x | | |
| 4 | Short | x | | |
| 5 | Short | | x | |
| 6 | Short | x | | |
| 7 | Short | x | | |
| 8 | Short | | x | |
| 9 | Short | x | | |
| 10 | Short | | | |
| 11 | Short | | | |
| 12 | Short | | | |
| 13 | Short | | | |
| 14 | Short | | | |
| 15 | Short | | | |
| 16 | Short | | | |
| 17 | Short | | | |
| 18 | Short | | | |
| 19 | Short | | | |
| 20 | Short | | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :----: | :-: | :-: | :-: |
| Longs | 11 | 04 | 07 |
| Shorts | 09 | 06 | 03 |
| Total | 20 | 10 | 10 |
#### Analysis
per trade volume: 10$
total drawdown: 200$
total lose: 100$
total reward: 200$
total cash: 300$
win rate: 50%
@@ -0,0 +1,96 @@
# XST_TMPLMCD5M
## Report
### Makret
XMRUSDT.P
### Exchange
Binance
### Time Frame
1h
### Start Date
8 jan 2023 | 14:00 UTC
### End Date
9 may 2023 | 03:00 UTC
### Risk to Reward
1:2
### Reports
#### Longs
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Long | | x | |
| 2 | Long | x | | |
| 3 | Long | x | | |
| 4 | Long | | x | |
| 5 | Long | | x | |
| 6 | Long | x | | |
| 7 | Long | | x | |
| 8 | Long | | x | |
| 9 | Long | | x | |
| 10 | Long | | | |
| 11 | Long | | | |
| 12 | Long | | | |
| 13 | Long | | | |
| 14 | Long | | | |
| 15 | Long | | | |
| 16 | Long | | | |
| 17 | Long | | | |
| 18 | Long | | | |
| 19 | Long | | | |
| 20 | Long | | | |
#### Shorts
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | x | | |
| 2 | Short | | x | |
| 3 | Short | | x | |
| 4 | Short | x | | |
| 5 | Short | | x | |
| 6 | Short | x | | |
| 7 | Short | | x | |
| 8 | Short | x | | |
| 9 | Short | | x | |
| 10 | Short | | x | |
| 11 | Short | | x | |
| 12 | Short | | | |
| 13 | Short | | | |
| 14 | Short | | | |
| 15 | Short | | | |
| 16 | Short | | | |
| 17 | Short | | | |
| 18 | Short | | | |
| 19 | Short | | | |
| 20 | Short | | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :----: | :-: | :-: | :-: |
| Longs | 09 | 03 | 06 |
| Shorts | 11 | 04 | 07 |
| Total | 20 | 07 | 13 |
#### Analysis
per trade volume: 10$
total drawdown: 200$
total lose: $
total reward: $
total cash: $
win rate: %
@@ -0,0 +1,344 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center XTrade TMPLMCD5M Strategy
// ---------------------------------------------
// in this strategy i must use:
// - Price Action Candle Recognition Indicator;
// - Swing Stop Loss Indicator;
// - TrenMagic Indicator;
// - Impulse MACD Oscillator;
// - Cycle Channel Oscillator;
//
// Maintainer:
// ------------
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
//
//////////////////////////////////////////////////////
//
//@version=5
indicator(title="SaherElm XTrade TMPLMCD5M Strategy", shorttitle = "XST_TMPLMCD5M", overlay = true)
//
// START Inputs ....
//
//
// Determines Show Signals or not ...
showSignals = input.bool(defval = true, title = "Show Signals", group = "Strategy")
showStopLosses = input.bool(defval = true, title = "Show Stop Losses", group = "Strategy")
//
// Show Signals based on their types ...
showLongSignals = input.bool(defval = true, title = "Show Long Signals", group = "Signals")
showShortSignals = input.bool(defval = true, title = "Show Short Signals", group = "Signals")
//
// Show Stop Losses based on their types ...
swingLoopback = input.int(defval = 7, title = "Swing Loopback Period", group = "Stop Loss")
showLongStopLosses = input.bool(defval = true, title = "Show Long Stop Losses", group = "Stop Loss")
showShortStopLosses = input.bool(defval = true, title = "Show Short Stop Losses", group = "Stop Loss")
//
// END Inputs ....
//
//
// START Functions ....
//
//////////////////////////////
// START Price Action Candles
//////////////////////////////
//
// Retrieve Specific Candle Height (based on low and high) ...
getCandleRange() =>
high - low
//
// Retrieve Candle Ranges Thirs Section ...
getCandleThird() =>
getCandleRange() / 3
//
// Determines a Candle is Bullish or not ...
isBullishCandle() =>
close > low + (getCandleThird() * 2)
//
// Determines a Candle is Bearish or not ...
isNeutralCandle() =>
close < low + (getCandleThird() * 2) and close > low + getCandleThird()
//
// Determines a Candle is Neutral or not ...
isBearishCandle() =>
close < low + getCandleThird()
/////////////////////////////
// END Price Action Candles
/////////////////////////////
//////////////////////
// START Impuls MACD
//////////////////////
//
calc_smma(src, len) =>
float result = na
rSma = ta.sma(src, len)
result := na(result[1]) ? rSma : (result[1] * (len - 1) + src) / len
result
//
calc_zlema(src, length) =>
ema1 = ta.ema(src, length)
ema2 = ta.ema(ema1, length)
d = ema1 - ema2
result = ema1+d
result
//////////////////////
// END Impuls MACD
//////////////////////
//
// END Functions ....
//
//
// START Calculations ....
//
//
var shortColor = color.fuchsia
var longColor = color.aqua
//////////////////////////////
// START Price Action Candles
//////////////////////////////
//
var bullishTitle = "Bullish"
var bullishType = 1
//
var bearishTitle = "Bearish"
var bearishType = -1
//
var neutralTitle = "Neutral"
var neutralType = 0
//
candleType = isBullishCandle() ? bullishType : isNeutralCandle() ? neutralType : isBearishCandle() ? bearishType : neutralType
//
prevCandleType = not na(candleType[1]) ? candleType[1] : neutralType
//
candleNeighborhoodBaseType = prevCandleType + candleType
/////////////////////////////
// END Price Action Candles
/////////////////////////////
////////////////////////////
// START Last Market Price
////////////////////////////
//
lastMarketLowest = ta.lowest(low, swingLoopback)
lastMarketLowest2 = ta.lowest(low, swingLoopback * 2)
lastMarketLowest3 = ta.lowest(low, swingLoopback * 3)
//
lastMarketHighest = ta.highest(high, swingLoopback)
lastMarketHighest2 = ta.highest(high, swingLoopback * 2)
lastMarketHighest3 = ta.highest(high, swingLoopback * 3)
////////////////////////////
// END Last Market Price
////////////////////////////
////////////////////////////
// START Trend Magic ...
////////////////////////////
TMAP = 5
TMCoeff = 1
TMPeriod = 18
TMSrc = close
//
TMATR = ta.sma(ta.tr,TMAP)
//
TMUpT = low - TMATR * TMCoeff
TMDownT = high + TMATR * TMCoeff
//
TMMagicTrend = 0.0
TMMagicTrend := ta.cci(TMSrc, TMPeriod) >= 0 ? (TMUpT < nz(TMMagicTrend[1]) ? nz(TMMagicTrend[1]) : TMUpT) : (TMDownT > nz(TMMagicTrend[1]) ? nz(TMMagicTrend[1]) : TMDownT)
//
// Check Candle State based on TMMagic Trend ...
TMCandleState = ta.cci(TMSrc, TMPeriod)
//
TMTrendUp = TMCandleState > 0
TMTrendDown = TMCandleState < 0
TMTrendNeutral = TMCandleState == 0
//
TMTrendDiff = TMMagicTrend - TMMagicTrend[1]
//
TMTrendChanged = (TMTrendUp and not TMTrendUp[1]) or (TMTrendDown and not TMTrendDown[1])
//
TMColor = TMTrendUp ? color.green : TMTrendDown ? color.red : TMTrendNeutral ? color.gray : na
////////////////////////////
// END Trend Magic ...
////////////////////////////
///////////////////////
// START Cycle Channel
///////////////////////
//
CCHSclT = 10
CCHMclT = 30
CCHScm = 1.0
CCHMcm = 3.0
CCHSrc = close
CCHEbc = false
//
CCHScl = CCHSclT / 2
CCHMcl = CCHMclT / 2
//
CCHMaScl = ta.rma(CCHSrc, CCHScl)
CCHMaMcl = ta.rma(CCHSrc, CCHMcl)
//
CCHScmOff = CCHScm * ta.atr(CCHScl)
CCHMcmOff = CCHMcm * ta.atr(CCHMcl)
//
CCHScl2 = CCHScl / 2
CCHMcl2 = CCHMcl / 2
//
CCHSct = nz(CCHMaScl[CCHScl2], CCHSrc) + CCHScmOff
CCHScb = nz(CCHMaScl[CCHScl2], CCHSrc) - CCHScmOff
//
CCHMct = nz(CCHMaMcl[CCHMcl2], CCHSrc) + CCHMcmOff
CCHMcb = nz(CCHMaMcl[CCHMcl2], CCHSrc) - CCHMcmOff
//
CCHScmm = math.avg(CCHSct, CCHScb)
//
CCHOmed = (CCHScmm - CCHMcb) / (CCHMct - CCHMcb)
CCHOshort = (CCHSrc - CCHMcb) / (CCHMct - CCHMcb)
//
CCHSlowOSC = CCHOmed
CCHFastOSC = CCHOshort
//
CCHMidPoint = 0.5
isCCHUpTrend = CCHFastOSC > CCHMidPoint
isCCHDownTrend = CCHFastOSC < CCHMidPoint
CCHTrendUp = ta.crossover(CCHFastOSC, CCHMidPoint)
CCHTrendDown = ta.crossunder(CCHFastOSC, CCHMidPoint)
CCHTrendBullish = ta.crossover(CCHFastOSC, CCHSlowOSC) and isBullishCandle()
//
CCHFastOSCDiff = CCHFastOSC - CCHFastOSC[1]
CCHSlowOSCDiff = CCHSlowOSC - CCHSlowOSC[1]
//
CCHBc = (CCHOshort > 0.5) ? (CCHOshort > 1.0 ? color.purple : (CCHOshort > CCHOmed ? color.lime : color.green)) : (CCHOshort < 0 ? color.purple : ( CCHOshort < CCHOmed ? color.red : color.orange))
///////////////////////
// END Cycle Channel
///////////////////////
//////////////////////
// START Impuls MACD
//////////////////////
//
IMPMACDLengthMA = 34
IMPMACDLengthSignal = 9
//
IMPMACDSrc = hlc3
IMPMACDHi = calc_smma(high, IMPMACDLengthMA)
IMPMACDLo = calc_smma(low, IMPMACDLengthMA)
IMPMACDNi = calc_zlema(IMPMACDSrc, IMPMACDLengthMA)
//
IMPMACDMd = (IMPMACDNi > IMPMACDHi) ? (IMPMACDNi - IMPMACDHi) : (IMPMACDNi < IMPMACDLo) ? (IMPMACDNi - IMPMACDLo) : 0.0
IMPMACDSb = ta.sma(IMPMACDMd, IMPMACDLengthSignal)
IMPMACDSh = IMPMACDMd - IMPMACDSb
//
IMPMACDIsBullish = (ta.crossunder(IMPMACDSb, IMPMACDMd) or ta.crossunder(IMPMACDSb[1], IMPMACDMd) or ta.crossunder(IMPMACDSb[2], IMPMACDMd)) and IMPMACDMd < 0 and IMPMACDSh > 0.1 and IMPMACDSb < IMPMACDMd and IMPMACDMd < -0.6
IMPMACDIsBearish = (ta.crossover(IMPMACDSb, IMPMACDMd) or ta.crossover(IMPMACDSb[1], IMPMACDMd) or ta.crossover(IMPMACDSb[2], IMPMACDMd)) and IMPMACDMd > 0 and IMPMACDSh < -0.1 and IMPMACDSb > IMPMACDMd and IMPMACDMd > 0.6
//////////////////////
// END Impuls MACD
//////////////////////
///////////////////////
// START Strategy ...
///////////////////////
//
canShowStopLoss = showSignals and showStopLosses and (showLongSignals or showShortSignals) and (showLongStopLosses or showShortStopLosses)
canShowLongStopLoss = canShowStopLoss and showLongStopLosses
canShowShortStopLoss = canShowStopLoss and showShortStopLosses
//
hasLongSignal = IMPMACDIsBullish and TMTrendUp and isBullishCandle() // and open < TMMagicTrend
longSignal = hasLongSignal ? bar_index : na
float longStopLoss = lastMarketLowest
//
hasShortSignal = IMPMACDIsBearish and TMTrendDown and isBearishCandle() // and open > TMMagicTrend
shortSignal = hasShortSignal ? bar_index : na
float shortStopLoss = lastMarketHighest
//
hasSignal = hasLongSignal or hasShortSignal
//
canShowSignal = showSignals and (showLongSignals or showShortSignals)
canShowLongSignal = canShowSignal and showLongSignals and hasLongSignal
canShowShortSignal = canShowSignal and showShortSignals and hasShortSignal
///////////////////////
// END Strategy ...
///////////////////////
//
// END Calculations ....
//
//
// START Plots ....
//
//
// Signals ...
plotshape(canShowLongSignal ? longSignal : na, title = "Long Signal", color = longColor, location = location.belowbar, style = shape.triangleup, size = size.normal)
plotshape(canShowShortSignal ? shortSignal : na, title = "Short Signal", color = shortColor, location = location.abovebar, style = shape.triangledown, size = size.normal)
//
// Stop Losses ...
plot(series = canShowLongStopLoss ? longStopLoss : na, color = color.fuchsia, linewidth = 1, style = plot.style_stepline, title = "Long Stop Loss")
plot(series = canShowShortStopLoss ? shortStopLoss : na, color = color.aqua, linewidth = 1, style = plot.style_stepline, title = "Short Stop Loss")
//
// END Plots ....
//
//
// START Alerts ...
//
alertcondition(hasSignal, "XST_SHULL5M > Signal")
alertcondition(hasLongSignal, "XST_SHULL5M > Long Signal")
alertcondition(hasShortSignal, "XST_SHULL5M > Short Signal")
//
// END Alerts ...
//
//////////////////////////////////////////////////////
// TODOS:
// -------
// - []
//////////////////////////////////////////////////////
+52
View File
@@ -0,0 +1,52 @@
# VB Momentum Scalping (XTS_VBM15M)
## Setup
- **TF**: 15m
- **Asset**: AAPL
- **R2R**: 1:1.5
- **Indicators**:
- vbm_Buy or Sell Signal (vbmohale):
- Change Factor to 4;
- **Oscillators**:
- Multpile Strategies (LupOwn):
- Change MOM Length to 17;
- Change SQZ Length to 17;
- Uncheck Show ADX;
- Uncheck Show Status;
## Using the Strategy
### Long/Buy Conditions
- VBM gives us BUY signal (label up);
- RSI => OSC Top Part shoud be above 0.5 level;
- Histogram of OSC shoud be green Color;
- Market forms a Bullish Candle;
#### Long SL
place sl at prev MArket lowest
#### Long TP
calculate based on R2R;
### Short/Sell Conditions
- VBM gives us SELL signal (label down);
- RSI => OSC Top Part shoud be below 0.5 level;
- Histogram of OSC shoud be red Color;
- Market forms a Bearish Candle;
#### Short SL
place sl at prev market highest;
#### Short TP
calculate based on R2R;
### Signals Overlap
how to handle signals overlaps.
+66
View File
@@ -0,0 +1,66 @@
# XST_SR15M
## Report 1
### Makret
ETHUSDT
### Exchange
Kucoin
### Time Frame
15min
### Start Date
23 april 2023 | 17:30
### End Date
18 may 2023 | 14:45
### Risk to Reward
1:1.5
### Reports
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | x | | |
| 2 | Short | | x | |
| 3 | Short | | x | Close in Loss Before Next Trader |
| 4 | Short | x | | |
| 5 | Short | x | | Close in Profit Before Next Trade |
| 6 | Short | | x | |
| 7 | Short | | x | |
| 8 | Short | x | | |
| 9 | Long | X | | |
| 10 | Long | | x | Close in Loss Before next Trade |
| 11 | Long | | x | |
| 12 | Long | x | | Close in Profit Before Next Trade |
| 13 | Long | x | | Close in Profit Before Next Trade |
| 14 | Long | x | | |
| 15 | Long | | x | |
| 16 | Long | x | | |
| 17 | Long | | x | |
| 18 | Long | | x | |
| 19 | Long | | x | |
| 20 | Long | | | Open |
#### Signals lts
| Type | Count | TPs | SLs |
| :-: | :-: | :-: | :-: |
| Shorts | 8 | 4 | 4 |
| Longs | 12 | 5 | 6 | 1 open
| Total | 20 | 9 | 11 |
#### Analysis
per trade volume: 10$
total lose: 110$
total reward: 135$
+295
View File
@@ -0,0 +1,295 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center XTrade VBM15M Strategy
// ---------------------------------------------
// in this strategy i must use:
// - Price Action Candle Recognition;
// - VBM Buy and Sell;
// - Multpile Strategies Oscillator;
//
// Maintainer:
// ------------
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
//
//////////////////////////////////////////////////////
//
//@version=5
indicator(title="SaherElm XTrade VBM15M Strategy", shorttitle = "XTS_VBM15M", overlay = true)
//
// START Inputs ....
//
//
// Determines Show Signals or not ...
showSignals = input.bool(defval = true, title = "Show Signals", group = "Strategy")
showStopLosses = input.bool(defval = true, title = "Show Stop Losses", group = "Strategy")
//
// Show Signals based on their types ...
showLongSignals = input.bool(defval = true, title = "Show Long Signals", group = "Signals")
showShortSignals = input.bool(defval = true, title = "Show Short Signals", group = "Signals")
//
// Show Stop Losses based on their types ...
swingLoopback = input.int(defval = 7, title = "Swing Loopback Period", group = "Stop Loss")
showLongStopLosses = input.bool(defval = true, title = "Show Long Stop Losses", group = "Stop Loss")
showShortStopLosses = input.bool(defval = true, title = "Show Short Stop Losses", group = "Stop Loss")
//
// END Inputs ....
//
//
// START Functions ....
//
//////////////////////////////
// START Price Action Candles
//////////////////////////////
//
// Retrieve Specific Candle Height (based on low and high) ...
getCandleRange() =>
high - low
//
// Retrieve Candle Ranges Thirs Section ...
getCandleThird() =>
getCandleRange() / 3
//
// Determines a Candle is Bullish or not ...
isBullishCandle() =>
close > low + (getCandleThird() * 2)
//
// Determines a Candle is Bearish or not ...
isNeutralCandle() =>
close < low + (getCandleThird() * 2) and close > low + getCandleThird()
//
// Determines a Candle is Neutral or not ...
isBearishCandle() =>
close < low + getCandleThird()
/////////////////////////////
// END Price Action Candles
/////////////////////////////
//////////////////////
// START MPS HIS
//////////////////////
//
biggest(series) =>
max = 0.0
max := nz(max[1], series)
if series > max
max := series
max
//////////////////////
// END MPS HIS
//////////////////////
//
// END Functions ....
//
//
// START Calculations ....
//
//
var shortColor = color.red
var longColor = color.lime
//////////////////////////////
// START Price Action Candles
//////////////////////////////
//
var bullishColor = color.lime
var bullishShape = shape.arrowup
var bullishTitle = "Bullish"
var bullishType = 1
//
var bearishColor = color.red
var bearishShape = shape.arrowdown
var bearishTitle = "Bearish"
var bearishType = -1
//
var neutralColor = color.gray
var neutralShape = shape.circle
var neutralTitle = "Neutral"
var neutralType = 0
//
candleType = isBullishCandle() ? bullishType : isNeutralCandle() ? neutralType : isBearishCandle() ? bearishType : neutralType
//
prevCandleType = not na(candleType[1]) ? candleType[1] : neutralType
//
candleNeighborhoodBaseType = prevCandleType + candleType
/////////////////////////////
// END Price Action Candles
/////////////////////////////
//////////////////////
// START VBM Buy Sell
//////////////////////
//
VBMBSFactor = 4
VBMBSPd = 7
//
VBMBSUp = hl2 - (VBMBSFactor * ta.atr(VBMBSPd))
VBMBSDown = hl2 + (VBMBSFactor * ta.atr(VBMBSPd))
//
// Trend Up ...
float VBMBSTrendUp = na
VBMBSTrendUp := close[1] > VBMBSTrendUp[1] ? math.max(VBMBSUp, VBMBSTrendUp[1]) : VBMBSUp
//
// Trend Down ...
float VBMBSTrendDown = na
VBMBSTrendDown := close[1] < VBMBSTrendDown[1] ? math.min(VBMBSDown, VBMBSTrendDown[1]) : VBMBSDown
//
float VBMBSTrend = na
VBMBSTrend := close > VBMBSTrendDown[1] ? 1 : close < VBMBSTrendUp[1] ? -1 : nz(VBMBSTrend[1], 1)
//
VBMBSMACD = VBMBSTrend == 1 ? VBMBSTrendUp : VBMBSTrendDown
//
VBMBSLinecolor = VBMBSTrend == 1 ? bullishColor : bearishColor
//
VBMBSUpArrow = ta.cross(close, VBMBSMACD) and close > VBMBSMACD
VBMBSDownArrow = ta.cross(VBMBSMACD, close) and close < VBMBSMACD
//
VBMBSLongSignal = VBMBSTrend == 1 and VBMBSTrend[1] == -1 ? VBMBSTrend : na
VBMBSHasLongSignal = not na (VBMBSLongSignal)
//
VBMBSShortSignal = VBMBSTrend == -1 and VBMBSTrend[1] == 1 ? VBMBSTrend : na
VBMBSHasShortSignal = not na (VBMBSShortSignal)
//
VBMBSHasSignal = VBMBSHasLongSignal or VBMBSHasShortSignal
//////////////////////
// END VBM Buy Sell
//////////////////////
//////////////////////
// START MPS HIS
//////////////////////
//
MPSScale = 75.0
//
// Momentum ...
MPSLengthM = 17
MPSSrcM = close
//
MPSLength = 17
MPSSrc = close
//
// Momentum ...
MPSSz = ta.linreg(MPSSrcM - math.avg(math.avg(ta.highest(high, MPSLengthM), ta.lowest(low, MPSLengthM)), ta.sma(close, MPSLengthM)), MPSLengthM, 0)
MPSNi = biggest(MPSSz)
//
// Momentum Conditions ...
MPSSc1 = MPSSz >= 0
MPSSc2 = MPSSz < 0
MPSSc3 = MPSSz >= MPSSz[1]
MPSSc4 = MPSSz < MPSSz[1]
//
// Momentum Identifiers ...
isMPSMomentumBullish = (MPSSc1 and MPSSc3) or (MPSSc1 and MPSSc4)
isMPSMomentumBearish = (MPSSc2 and MPSSc4) or (MPSSc2 and MPSSc3)
//////////////////////
// END MPS HIS
//////////////////////
////////////////////////////
// START Last Market Price
////////////////////////////
//
lastMarketLowest = ta.lowest(low, swingLoopback)
lastMarketLowest2 = ta.lowest(low, swingLoopback * 2)
lastMarketLowest3 = ta.lowest(low, swingLoopback * 3)
//
lastMarketHighest = ta.highest(high, swingLoopback)
lastMarketHighest2 = ta.highest(high, swingLoopback * 2)
lastMarketHighest3 = ta.highest(high, swingLoopback * 3)
////////////////////////////
// END Last Market Price
////////////////////////////
///////////////////////
// START Strategy ...
///////////////////////
//
canShowStopLoss = showSignals and showStopLosses and (showLongSignals or showShortSignals) and (showLongStopLosses or showShortStopLosses)
canShowLongStopLoss = canShowStopLoss and showLongStopLosses // and not na(ATRSLLongStopLoss)
canShowShortStopLoss = canShowStopLoss and showShortStopLosses // and not na(ATRSLShortStopLoss)
//
hasSignal = VBMBSHasSignal
//
hasLongSignal = hasSignal and isBullishCandle() and VBMBSHasLongSignal and isMPSMomentumBullish
longSignal = hasLongSignal ? VBMBSLongSignal : na
float longStopLoss = lastMarketLowest
//
hasShortSignal = hasSignal and isBearishCandle() and VBMBSHasShortSignal and isMPSMomentumBearish
shortSignal = hasShortSignal ? VBMBSShortSignal : na
float shortStopLoss = lastMarketHighest
//
canShowSignal = showSignals and (showLongSignals or showShortSignals)
canShowLongSignal = canShowSignal and showLongSignals and hasLongSignal
canShowShortSignal = canShowSignal and showShortSignals and hasShortSignal
///////////////////////
// END Strategy ...
///////////////////////
//
// END Calculations ....
//
//
// START Plots ....
//
//
// Signals ...
plotshape(canShowLongSignal ? longSignal : na, title = "Long Signal", color = longColor, location = location.belowbar, style = shape.triangleup, size = size.normal)
plotshape(canShowShortSignal ? shortSignal : na, title = "Short Signal", color = shortColor, location = location.abovebar, style = shape.triangledown, size = size.normal)
//
// Stop Losses ...
plot(series = canShowLongStopLoss ? longStopLoss : na, color = color.fuchsia, linewidth = 1, style = plot.style_stepline, title = "Long Stop Loss")
plot(series = canShowShortStopLoss ? shortStopLoss : na, color = color.aqua, linewidth = 1, style = plot.style_stepline, title = "Short Stop Loss")
//
// END Plots ....
//
//
// START Alerts ...
//
alertcondition(hasSignal, "XST_SHULL5M > Signal")
alertcondition(hasLongSignal, "XST_SHULL5M > Long Signal")
alertcondition(hasShortSignal, "XST_SHULL5M > Short Signal")
//
// END Alerts ...
//
//////////////////////////////////////////////////////
// TODOS:
// -------
// - []
//////////////////////////////////////////////////////
@@ -0,0 +1,51 @@
# Hull Scalping (XTS_SHULL5M)
## Setup
- **TF**: 5m
- **Asset**: AAPL
- **R2R**: 1:1.5
- **Indicators**:
- Hull Trend (jaggedsoft):
- Change Length to 23;
- **Oscillators**:
- Hull Butterfly Oscillator (LuxAlgo):
- Change Bullish Dot to Columns;
- Change Bearish Dot to Columns;
- Change Length to 11;
## Using the Strategy
### Long/Buy Conditions
- OSC gives Bullish Reversal Signal;
- OSC Wait's 1 bar to confirmation;
- HT Ind gives Buy Signal;
- Market forms a Bullish Candle;
#### Long SL
place sl at prev MArket lowest
#### Long TP
calculate based on R2R;
### Short/Sell Conditions
- OSC gives Bearish Reversal Signal;
- OSC Wait's 1 bar to confirmation;
- HT Ind gives Sell Signal;
- Market forms a Bearish Candle;
#### Short SL
place sl at prev market highest;
#### Short TP
calculate based on R2R;
### Signals Overlap
how to handle signals overlaps.
+67
View File
@@ -0,0 +1,67 @@
# XST_SR15M
## Report 1
### Makret
ETHUSDT
### Exchange
Kucoin
### Time Frame
15min
### Start Date
24 april 2023 | 01:15
### End Date
18 may 2023 | 14:45
### Risk to Reward
1:1.5
### Reports
| ID | Position Type | TP | SL | Description |
| :--: | :-----------: | :--: | :--: | :---------- |
| 1 | Short | | | |
| 2 | Short | | | |
| 3 | Short | | | |
| 4 | Short | | | |
| 5 | Short | | | |
| 6 | Short | | | |
| 7 | Short | | | |
| 8 | Short | | | |
| 9 | Short | | | |
| 10 | Long | | | |
| 11 | Long | | | |
| 12 | Long | | | |
| 13 | Long | | | |
| 14 | Long | | | |
| 15 | Long | | | |
| 16 | Long | | | |
| 17 | Long | | | |
| 18 | Long | | | |
| 19 | Long | | | |
| 20 | Long | | | |
| 21 | Long | | | |
#### Signals Results
| Type | Count | TPs | SLs |
| :-: | :-: | :-: | :-: |
| Shorts | 9 | 4 | 5 |
| Longs | 12 | 7 | 5 |
| Total | 21 | 11 | 10 |
#### Analysis
per trade volume: 10$
total spending: 210$
total comeback: 165$
+234
View File
@@ -0,0 +1,234 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center XTrade SHULL5M Strategy
// ---------------------------------------------
// in this strategy i must use:
// - Price Action Candle Recognition;
// - Hull Trend;
// - Hull Butterfly Oscillator;
//
// Maintainer:
// ------------
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
//
//////////////////////////////////////////////////////
//
//@version=5
indicator(title="SaherElm XTrade SHULL5M Strategy", shorttitle = "XST_SHULL5M", overlay = true)
//
// START Inputs ....
//
//
// Determines Show Signals or not ...
showSignals = input.bool(defval = true, title = "Show Signals", group = "Strategy")
showStopLosses = input.bool(defval = true, title = "Show Stop Losses", group = "Strategy")
//
// Show Signals based on their types ...
showLongSignals = input.bool(defval = true, title = "Show Long Signals", group = "Signals")
showShortSignals = input.bool(defval = true, title = "Show Short Signals", group = "Signals")
//
// Show Stop Losses based on their types ...
showLongStopLosses = input.bool(defval = true, title = "Show Long Stop Losses", group = "Stop Loss")
showShortStopLosses = input.bool(defval = true, title = "Show Short Stop Losses", group = "Stop Loss")
//
// END Inputs ....
//
//
// START Functions ....
//
//////////////////////////////
// START Price Action Candles
//////////////////////////////
//
// Retrieve Specific Candle Height (based on low and high) ...
getCandleRange() =>
high - low
//
// Retrieve Candle Ranges Thirs Section ...
getCandleThird() =>
getCandleRange() / 3
//
// Determines a Candle is Bullish or not ...
isBullishCandle() =>
close > low + (getCandleThird() * 2)
//
// Determines a Candle is Bearish or not ...
isNeutralCandle() =>
close < low + (getCandleThird() * 2) and close > low + getCandleThird()
//
// Determines a Candle is Neutral or not ...
isBearishCandle() =>
close < low + getCandleThird()
/////////////////////////////
// END Price Action Candles
/////////////////////////////
///////////////////////
// START Hull Trend ...
///////////////////////
//
HUTRHma(src, length)=>
ta.wma((2 * ta.wma(src, length / 2)) - ta.wma(src, length), math.round(math.sqrt(length)))
//
HUTRHma3(src, length)=>
p = length / 2
ta.wma(ta.wma(close, p / 3) * 3 - ta.wma(close, p / 2) - ta.wma(close, p) ,p)
///////////////////////
// END Hull Trend ...
///////////////////////
//
// END Functions ....
//
//
// START Calculations ....
//
//
var shortColor = color.red
var longColor = color.lime
//////////////////////////////
// START Price Action Candles
//////////////////////////////
//
var bullishColor = color.lime
var bullishShape = shape.arrowup
var bullishTitle = "Bullish"
var bullishType = 1
//
var bearishColor = color.red
var bearishShape = shape.arrowdown
var bearishTitle = "Bearish"
var bearishType = -1
//
var neutralColor = color.gray
var neutralShape = shape.circle
var neutralTitle = "Neutral"
var neutralType = 0
//
candleType = isBullishCandle() ? bullishType : isNeutralCandle() ? neutralType : isBearishCandle() ? bearishType : neutralType
//
prevCandleType = not na(candleType[1]) ? candleType[1] : neutralType
//
candleNeighborhoodBaseType = prevCandleType + candleType
/////////////////////////////
// END Price Action Candles
/////////////////////////////
///////////////////////
// START Hull Trend ...
///////////////////////
//
HUTRSrc = hl2
HUTRLength = 23
//
HUTRA = HUTRHma(HUTRSrc, HUTRLength)
HUTRB = HUTRHma3(HUTRSrc, HUTRLength)
HUTRColor = HUTRB > HUTRA ? color.lime : color.red
//
HUTRCrossDown = HUTRA > HUTRB and HUTRA[1] < HUTRB[1]
HUTRCrossUp = HUTRB > HUTRA and HUTRB[1] < HUTRA[1]
//
HUTRLongSignal = HUTRCrossUp ? HUTRA : na
HUTRShortSignal = HUTRCrossDown ? HUTRA : na
//
HUTRHasSignal = not na(HUTRLongSignal) or not na(HUTRShortSignal)
HUTRHasLongSignal = HUTRHasSignal and not na(HUTRLongSignal)
HUTRHasShortSignal = HUTRHasSignal and not na(HUTRShortSignal)
//
// plotshape(HUTRLongSignal, location = location.belowbar, style = shape.labelup, color = color.green, size = size.tiny, text = "Buy", textcolor = color.white)
// plotshape(HUTRShortSignal, location = location.abovebar, style = shape.labeldown, color = color.red, size = size.tiny, text = "Sell", textcolor = color.white)
///////////////////////
// END Hull Trend ...
///////////////////////
////////////////////////////
// START Hull Butterfly ...
////////////////////////////
////////////////////////////
// END Hull Butterfly ...
////////////////////////////
///////////////////////
// START Strategy ...
///////////////////////
//
canShowStopLoss = showSignals and showStopLosses and (showLongSignals or showShortSignals) and (showLongStopLosses or showShortStopLosses)
canShowLongStopLoss = canShowStopLoss and showLongStopLosses // and not na(ATRSLLongStopLoss)
canShowShortStopLoss = canShowStopLoss and showShortStopLosses // and not na(ATRSLShortStopLoss)
//
hasSignal = HUTRHasSignal
//
hasLongSignal = hasSignal and isBullishCandle() and HUTRHasLongSignal
longSignal = hasLongSignal ? HUTRLongSignal : na
float longStopLoss = na
//
hasShortSignal = hasSignal and isBearishCandle() and HUTRHasShortSignal
shortSignal = hasShortSignal ? HUTRShortSignal : na
float shortStopLoss = na
//
canShowSignal = showSignals and (showLongSignals or showShortSignals)
canShowLongSignal = canShowSignal and showLongSignals and hasLongSignal
canShowShortSignal = canShowSignal and showShortSignals and hasShortSignal
///////////////////////
// END Strategy ...
///////////////////////
//
// END Calculations ....
//
//
// START Plots ....
//
//
// Signals ...
plotshape(canShowLongSignal ? longSignal : na, title = "Long Signal", color = longColor, location = location.belowbar, style = shape.triangleup, size = size.normal)
plotshape(canShowShortSignal ? shortSignal : na, title = "Short Signal", color = shortColor, location = location.abovebar, style = shape.triangledown, size = size.normal)
//
// Stop Losses ...
plot(series = canShowLongStopLoss ? longStopLoss : na, color = color.fuchsia, linewidth = 1, style = plot.style_stepline, title = "Long Stop Loss")
plot(series = canShowShortStopLoss ? shortStopLoss : na, color = color.aqua, linewidth = 1, style = plot.style_stepline, title = "Short Stop Loss")
//
// END Plots ....
//
//
// START Alerts ...
//
alertcondition(hasSignal, "XST_SHULL5M > Signal")
alertcondition(hasLongSignal, "XST_SHULL5M > Long Signal")
alertcondition(hasShortSignal, "XST_SHULL5M > Short Signal")
//
// END Alerts ...
//
//////////////////////////////////////////////////////
// TODOS:
// -------
// - []
//////////////////////////////////////////////////////