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