alimoee commited on
Commit
89ffac5
·
verified ·
1 Parent(s): b2d634e

macdSignal = ta.ema(macdLine, 9)

longCondition = close > sslUp and
trendDirection > 0 and
rsiValue > 50 and
macdLine > macdSignal and
(engulfingBullish or close > open[1])

shortCondition = close < sslDown and
trendDirection < 0 and

Syntax error at input "end of line without line continuation"
5:36:59 AM "Untitled script" opened
5:38:38 AM Compiling...
5:38:39 AM Error at 47:60 Could not find function or function reference 'security'
5:40:18 AM Compiling...
5:40:20 AM Compiled.
5:40:20 AM Updated on chart.
5:48:44 AM Compiling...
5:48:45 AM Error at 65:65 The "strategy.entry" function does not have an argument with the name "when"
5:48:45 AM Error at 69:67 The "strategy.entry" function does not have an argument with the name "when"
5:50:50 AM Compiling...
5:50:52 AM Compiled.
5:50:52 AM Updated on chart.
6:03:34 AM Compiling...
6:03:35 AM Error at 29:77 Syntax error at input "end of line without line continuation"
6:04:16 AM Compiling...
6:04:16 AM Error at 29:77 Syntax error at input "end of line without line continuation"
6:04:30 AM Compiling...
6:04:31 AM Error at 43:35 Syntax error at input "end of line without line continuation"
6:04:51 AM Compiling...
6:04:52 AM Error at 89:44 Syntax error at input "end of line without line continuation"
6:05:08 AM Compiling...
6:05:10 AM Error at 93:46 Syntax error at input "end of line without line continuation"
6:05:30 AM Compiling...
6:05:31 AM Error at 29:81 Cannot call "operator SQBR" with argument "expr0"="call "ta.supertrend" ([series float, series float])". An argument of "[series float, series float]" type was used but a "series na" is expected.
6:05:31 AM Error at 97:6 Undeclared identifier "hullTrend"
6:06:37 AM Compiling...
6:06:38 AM Error at 29:77 Syntax error at input "end of line without line continuation"
6:07:48 AM Compiling...
6:07:49 AM Error at 43:35 Syntax error at input "end of line without line continuation"

Files changed (1) hide show
  1. ssl-hybrid-bot.pine +6 -8
ssl-hybrid-bot.pine CHANGED
@@ -26,7 +26,7 @@ volatilityFactor = math.max(1, math.min(3, atrRatio * 3))
26
  sslUp = sslBaseUp + (atrValue * 0.5 * volatilityFactor)
27
  sslDown = sslBaseDown - (atrValue * 0.5 * volatilityFactor)
28
  // Multi-Timeframe SuperTrend Confirmation
29
- [supertrendTrend, supertrendDir] = request.security(syminfo.tickerid, "15", ta.supertrend(3, 10))
30
  supertrendDirection = supertrendDir[1] > close ? -1 : 1
31
  // Volume Weighted Trend Confirmation
32
  volumeAvg = ta.sma(volume, 20)
@@ -45,10 +45,9 @@ longCondition = close > sslUp and
45
  rsiValue > 50 and
46
  macdLine > macdSignal and
47
  (engulfingBullish or close > open[1])
48
-
49
  shortCondition = close < sslDown and
50
- trendDirection < 0 and
51
- rsiValue < 50 and
52
  macdLine < macdSignal and
53
  (engulfingBearish or close < open[1])
54
  // Auto-Trading Conditions
@@ -87,16 +86,15 @@ isNewsTime = dayofweek == dayofweek.friday and hour >= 13 and hour <= 15
87
  // Enhanced Strategy Execution with Time Filters
88
  isOptimalTime = (hour >= 8 and hour <= 18) or (dayofweek != dayofweek.saturday and dayofweek != dayofweek.sunday)
89
  if time > timestamp(2020, 1, 1, 0, 0)
90
- if (autoTradeLong and (not inputUseNewsFilter or not isNewsTime) and barstate.isconfirmed and isOptimalTime)
91
  strategy.entry("Long", strategy.long, qty=positionSize)
92
  strategy.exit("Long Exit", "Long",
93
  stop=longTrailPrice,
94
  limit=takeProfitLong,
95
  trail_points=close * 0.005,
96
  trail_offset=close * 0.003)
97
-
98
- if (autoTradeShort and (not inputUseNewsFilter or not isNewsTime) and barstate.isconfirmed and isOptimalTime)
99
- strategy.entry("Short", strategy.short, qty=positionSize)
100
  strategy.exit("Short Exit", "Short",
101
  stop=shortTrailPrice,
102
  limit=takeProfitShort,
 
26
  sslUp = sslBaseUp + (atrValue * 0.5 * volatilityFactor)
27
  sslDown = sslBaseDown - (atrValue * 0.5 * volatilityFactor)
28
  // Multi-Timeframe SuperTrend Confirmation
29
+ supertrendDir = request.security(syminfo.tickerid, "15", ta.supertrend(3, 10)[1])
30
  supertrendDirection = supertrendDir[1] > close ? -1 : 1
31
  // Volume Weighted Trend Confirmation
32
  volumeAvg = ta.sma(volume, 20)
 
45
  rsiValue > 50 and
46
  macdLine > macdSignal and
47
  (engulfingBullish or close > open[1])
 
48
  shortCondition = close < sslDown and
49
+ trendDirection < 0 and
50
+ rsiValue < 50 and
51
  macdLine < macdSignal and
52
  (engulfingBearish or close < open[1])
53
  // Auto-Trading Conditions
 
86
  // Enhanced Strategy Execution with Time Filters
87
  isOptimalTime = (hour >= 8 and hour <= 18) or (dayofweek != dayofweek.saturday and dayofweek != dayofweek.sunday)
88
  if time > timestamp(2020, 1, 1, 0, 0)
89
+ if autoTradeLong and (not inputUseNewsFilter or not isNewsTime) and barstate.isconfirmed and isOptimalTime
90
  strategy.entry("Long", strategy.long, qty=positionSize)
91
  strategy.exit("Long Exit", "Long",
92
  stop=longTrailPrice,
93
  limit=takeProfitLong,
94
  trail_points=close * 0.005,
95
  trail_offset=close * 0.003)
96
+ if autoTradeShort and (not inputUseNewsFilter or not isNewsTime) and barstate.isconfirmed and isOptimalTime
97
+ strategy.entry("Short", strategy.short, qty=positionSize)
 
98
  strategy.exit("Short Exit", "Short",
99
  stop=shortTrailPrice,
100
  limit=takeProfitShort,