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
@@ -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:
// -------
// - []
//////////////////////////////////////////////////////