0% found this document useful (0 votes)
158 views10 pages

Super Scalper Strategy v3.3 Update (3) Taitrading

The document outlines the 'Super Scalper Strategy v3.3' for trading, including user-defined settings for timeframes, sensitivity, stop loss, and take profit percentages. It features a non-repainting security function and various indicators such as RSI, EMA, and baseline calculations to determine entry and exit points. The strategy incorporates order blocks and filters to enhance trading decisions based on market momentum.

Uploaded by

tiresdev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views10 pages

Super Scalper Strategy v3.3 Update (3) Taitrading

The document outlines the 'Super Scalper Strategy v3.3' for trading, including user-defined settings for timeframes, sensitivity, stop loss, and take profit percentages. It features a non-repainting security function and various indicators such as RSI, EMA, and baseline calculations to determine entry and exit points. The strategy incorporates order blocks and filters to enhance trading decisions based on market momentum.

Uploaded by

tiresdev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 10

// Crypto_Saiyan

//@version=5
strategy("Super Scalper Strategy v3.3", overlay=true, max_labels_count=500,
default_qty_type = strategy.percent_of_equity, default_qty_value = 100,
initial_capital = 100)
///////////////////////////////////////////////////////////////////////////////
//-----------------------------CRYPTO-SLAYA----------------------------------//
///////////////////////////////////////////////////////////////////////////////
// Get user settings
res = input.timeframe(title='TIMEFRAME', defval='15', group ="NON
REPAINT")
sensitivity = input.float(4, "SENSITIVITY (1-10)", 0.1, 10)
percentStop = input.float(0.8, "STOP LOSS %", 0)
percentTake = input.float(0.45, "TAKE PROFIT %", 0)
// Entry & Exit
enableE = input(true, "EXIT & ENTRY ON/OFF", group="EXIT & ENTRY")
Stop = input.color(color.new(#83868f, 5), "STOP LOSS")
Entry = input.color(color.new(#8d020e, 5), "ENTRY")
Tp1 = input.color(color.new(#038007, 5), "TAKE PROFIT")
// Create non-repainting security function
rp_security(_symbol, _res, _src) =>
request.security(_symbol, _res, _src[barstate.isrealtime ? 1 : 0])

htfHigh = rp_security(syminfo.tickerid, res, high)


htfLow = rp_security(syminfo.tickerid, res, low)

// Main Indicator
// Functions
smoothrng(x, t, m) =>
wper = t * 2 - 1
avrng = ta.ema(math.abs(x - x[1]), t)
smoothrng = ta.ema(avrng, wper) * m
rngfilt(x, r) =>
rngfilt = x
rngfilt := x > nz(rngfilt[1]) ? x - r < nz(rngfilt[1]) ? nz(rngfilt[1]) : x - r
: x + r > nz(rngfilt[1]) ? nz(rngfilt[1]) : x + r
percWidth(len, perc) => (ta.highest(len) - ta.lowest(len)) * perc / 100
securityNoRep(sym, res, src) => request.security(sym, res, src, barmerge.gaps_off,
barmerge.lookahead_on)
swingPoints(prd) =>
pivHi = ta.pivothigh(prd, prd)
pivLo = ta.pivotlow (prd, prd)
last_pivHi = ta.valuewhen(pivHi, pivHi, 1)
last_pivLo = ta.valuewhen(pivLo, pivLo, 1)
hh = pivHi and pivHi > last_pivHi ? pivHi : na
lh = pivHi and pivHi < last_pivHi ? pivHi : na
hl = pivLo and pivLo > last_pivLo ? pivLo : na
ll = pivLo and pivLo < last_pivLo ? pivLo : na
[hh, lh, hl, ll]
f_chartTfInMinutes() =>
float _resInMinutes = timeframe.multiplier * (
timeframe.isseconds ? 1 :
timeframe.isminutes ? 1. :
timeframe.isdaily ? 60. * 24 :
timeframe.isweekly ? 60. * 24 * 7 :
timeframe.ismonthly ? 60. * 24 * 30.4375 : na)
f_kc(src, len, sensitivity) =>
basis = ta.sma(src, len)
span = ta.atr(len)
[basis + span * sensitivity, basis - span * sensitivity]

// Get components
source = input(close, title = "Smoothring Source", group = "Smoothing")
smrng1_input= input.int(10, "Smring1", 1, 100 , 1 , group = "Smoothing")
smrng1_sens = input.float(defval = 2,title = "sens",minval = 0.1, maxval = 5 , step
= 0.01 , group = "Smoothing")
smrng2_input= input.int(80, "Smring2", 1, 100 , 1 , group = "Smoothing")
smrng1 = smoothrng(source, smrng1_input, smrng1_sens)
smrng2 = smoothrng(source, smrng2_input, sensitivity)
smrng = (smrng1 + smrng2) / 1.5
filt = rngfilt(source, smrng)
up = 0.0, up := filt > filt[1] ? nz(up[1]) + 1 : filt < filt[1] ? 0 :
nz(up[1])
dn = 0.0, dn := filt < filt[1] ? nz(dn[1]) + 1 : filt > filt[1] ? 0 :
nz(dn[1])
bullCond = bool(na), bullCond := source > filt and source > source[1] and up > 0
or source > filt and source < source[1] and up > 0
bearCond = bool(na), bearCond := source < filt and source < source[1] and dn > 0
or source < filt and source > source[1] and dn > 0
lastCond = 0, lastCond := bullCond ? 1 : bearCond ? -1 : lastCond[1]
bull = bullCond and lastCond[1] == -1
bear = bearCond and lastCond[1] == 1
countBull = ta.barssince(bull)
countBear = ta.barssince(bear)
trigger = nz(countBull, bar_index) < nz(countBear, bar_index) ? 1 : 0
rsi = ta.rsi(close, 28)
rsiOb = rsi > 78 and rsi > ta.ema(rsi, 10)
rsiOs = rsi < 27 and rsi < ta.ema(rsi, 10)
dHigh = securityNoRep(syminfo.tickerid, "D", high [1])
dLow = securityNoRep(syminfo.tickerid, "D", low [1])
dClose = securityNoRep(syminfo.tickerid, "D", close[1])
ema = ta.ema(close, 144)
emaBull = close > ema
equal_tf(res) => str.tonumber(res) == f_chartTfInMinutes() and not
timeframe.isseconds
higher_tf(res) => str.tonumber(res) > f_chartTfInMinutes() or timeframe.isseconds
too_small_tf(res) => (timeframe.isweekly and res=="1") or (timeframe.ismonthly and
str.tonumber(res) < 10)
securityNoRep1(sym, res, src) =>
bool bull_ = na
bull_ := equal_tf(res) ? src : bull_
bull_ := higher_tf(res) ? request.security(sym, res, src, barmerge.gaps_off,
barmerge.lookahead_on) : bull_
bull_array = request.security_lower_tf(syminfo.tickerid, higher_tf(res) ?
str.tostring(f_chartTfInMinutes()) + (timeframe.isseconds ? "S" : "") :
too_small_tf(res) ? (timeframe.isweekly ? "3" : "10") : res, src)
if array.size(bull_array) > 1 and not equal_tf(res) and not higher_tf(res)
bull_ := array.pop(bull_array)
array.clear(bull_array)
bull_
TF1Bull = securityNoRep1(syminfo.tickerid, "1" , emaBull)
TF3Bull = securityNoRep1(syminfo.tickerid, "3" , emaBull)
TF5Bull = securityNoRep1(syminfo.tickerid, "5" , emaBull)
TF15Bull = securityNoRep1(syminfo.tickerid, "15" , emaBull)
TF30Bull = securityNoRep1(syminfo.tickerid, "30" , emaBull)
TF60Bull = securityNoRep1(syminfo.tickerid, "60" , emaBull)
TF120Bull = securityNoRep1(syminfo.tickerid, "120" , emaBull)
TF240Bull = securityNoRep1(syminfo.tickerid, "240" , emaBull)
TF480Bull = securityNoRep1(syminfo.tickerid, "480" , emaBull)
TFDBull = securityNoRep1(syminfo.tickerid, "1440", emaBull)

srcStop = close
atrBand = srcStop * (percentStop / 100)
atrBand2 = srcStop * (percentTake / 100)
atrStop = trigger ? srcStop - atrBand : srcStop + atrBand
atrTake = trigger ? srcStop - atrBand2 : srcStop + atrBand2
lastTrade(src) => ta.valuewhen(bull or bear, src, 0)
entry_y = lastTrade(srcStop)
stop_y = lastTrade(atrStop)
tp1_y = (entry_y - lastTrade(atrTake)) + entry_y

// Labels
labelTpSl(y, txt, color) =>
label labelTpSl = percentStop and enableE != 0 ? label.new(bar_index + 1, y,
txt, xloc.bar_index, yloc.price, color, label.style_label_left, color.white,
size.normal) : na
label.delete(labelTpSl[1])
labelTpSl(entry_y, "Entry: " + str.tostring(math.round_to_mintick(entry_y)), color
= Entry)
labelTpSl(stop_y , "Stop Loss: " + str.tostring(math.round_to_mintick(stop_y)),
color = Stop)
labelTpSl(tp1_y, "Take Profit: " + str.tostring(math.round_to_mintick(tp1_y)),
color = Tp1)
lineTpSl(y, color) =>
line lineTpSl = percentStop and enableE != 0 ? line.new(bar_index - (trigger ?
countBull : countBear) + 4, y, bar_index + 1, y, xloc.bar_index, extend.none,
color, line.style_solid) : na
line.delete(lineTpSl[1])
lineTpSl(entry_y, color = Entry)
lineTpSl(stop_y, color = Stop)
lineTpSl(tp1_y, color = Tp1)
////////////////////////////////////////////////////////////////////////////////
//------------------------------BASELINE--------------------------------------//
////////////////////////////////////////////////////////////////////////////////
show_Baseline = input(title='Show Baseline', defval=true, group="BASELINE")
////BASELINE VALUES
maType = input.string(title='Baseline Type', defval='WMA', options=['SMA', 'EMA',
'WMA'])
len8 = input(title='Baseline Length', defval=50)
src8 = input(title='Source', defval=close)
//
tema(src8, len8) =>
ema1 = ta.ema(src8, len8)
ema2 = ta.ema(ema1, len8)
ema3 = ta.ema(ema2, len8)
3 * ema1 - 3 * ema2 + ema3

//----
ma(type, src8, len8) =>
float result = 0
if type == 'SMA' // Simple
result := ta.sma(src8, len8)
result
if type == 'EMA' // Exponential
result := ta.ema(src8, len8)
result
if type == 'WMA' // Weighted
result := ta.wma(src8, len8)
result

///Baseline Channel
BBMC = ma(maType, close, len8)
useTrueRange = input(true)
multy = input.float(0.2, step=0.05, title='Base Channel Multiplier')
Keltma = ma(maType, src8, len8)
range_1 = useTrueRange ? ta.tr : high - low
rangema = ta.ema(range_1, len8)
upperk = Keltma + rangema * multy
lowerk = Keltma - rangema * multy

emaHigh = ma(maType, high, len8)


emaLow = ma(maType, low, len8)

//Baseline Violation Candle


open_pos = open * 1
close_pos = close * 1
difference = math.abs(close_pos - open_pos)

//COLORS
color_bar = close > upperk ? #39ff14 : close < lowerk ? #ff1100 : color.yellow

//PLOTS
p1 = plot(show_Baseline ? BBMC : na, color=color_bar, linewidth=6,
title='Baseline', transp=0)
////////////////////////////////////////////////////////////////////////////////
//--------------------------FILTER-OVER/UNDER-EMA-----------------------------//
////////////////////////////////////////////////////////////////////////////////
// inputs
emafilter = input.bool(true, title="Filter Over/Under EMA", group="EMA Filter")
emalength = input.int(200, title="EMA Length")

hmafilter = input.bool(true, title="Filter Over/Under HMA", group="HMA Filter")


hmalength = input.int(100, title="HMA Length")

basefilter = input.bool(true, title="Filter Over/Under BASELINE", group="BASELINE


Filter")
baselength = input.int(50, title="BASELINE Length")

src7 = close
//Inputs
i_priceSrc = input.source ( close, 'Price Source', group='Properties')
i_basisType = input.string ( 'SMA', 'Basis Type', options=['SMA', 'EMA',
'WMA'], group='Properties')
///////////////////////////////////////////////////////////////////////////////
// function declarations
f_maType ( _price, _len, _type ) =>
_type == 'SMA' ? ta.sma ( _price, _len ) : _type == 'EMA' ? ta.ema ( _price,
_len ) : ta.wma ( _price, _len )

// use Heikin Ashi candle data to catch momentum


openHA = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period,
open)
closeHA = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period,
close)
highHA = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period,
high)
lowHA = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period,
low)

shadowless_rise = (openHA <= lowHA) ? 1 : 0


shadowless_fall = (openHA >= highHA) ? 1 : 0

emaline = ta.ema(close, emalength)

if emafilter and close < emaline


bull := 0

if emafilter and close > emaline


bear := 0

hmaline = ta.wma(2 * ta.wma(src7, hmalength / 2) - ta.wma(src7, hmalength),


math.floor(math.sqrt(hmalength)))

if hmafilter and close < hmaline


bull := 0

if hmafilter and close > hmaline


bear := 0

baseline = ta.wma(src8, baselength)

if basefilter and close < baseline


bull := 0

if basefilter and close > baseline


bear := 0
/////////////////////////////////////////////////////////////////////////
//--------------------------ORDER-BLOCKS-------------------------------//
/////////////////////////////////////////////////////////////////////////
sens = input.int(20, minval=1, title='Sensitivity', group='Order Blocks',
tooltip='Lower the sensitivity to show more order blocks. A higher sensitivity will
show less order blocks.')
sens /= 100

// OB
OBMitigationType = input.string("Close", title="Mitigation Type", options=["Close",
"Wick"], group="Order Blocks", tooltip="Choose how Order Blocks are mitigated")
OBBullMitigation = OBMitigationType=="Close" ? close[1] : low
OBBearMitigation = OBMitigationType=="Close" ? close[1] : high

//OB Colors
col_bullish = input.color(#5db49e, title="Bullish OB Border", inline="a",
group="Order Blocks")
col_bullish_ob = input.color(color.new(#64C4AC, 85), title="Background",
inline="a", group="Order Blocks")

col_bearish = input.color(#ff9100, title="Bearish OB Border", inline="b",


group="Order Blocks")
col_bearish_ob = input.color(color.new(#ff7b00, 85), title="Background",
inline="b", group="Order Blocks")

// Delacring Variables
bool ob_created = false
bool ob_created_bull = false
var int cross_index = na

// Declaring Box Arrays


var box drawlongBox = na
var longBoxes = array.new_box()
var box drawShortBox = na
var shortBoxes = array.new_box()

// Custom Rate of Change (ROC) calculation. This is to calculate high momentum


moves in the market.
pc = (open - open[4]) / open[4] * 100

// If the ROC crossover our Sensitivty input - Then create an Order Block
// Sensitivty is negative as this is a Bearish OB
if ta.crossunder(pc, -sens)
ob_created := true
cross_index := bar_index
cross_index

// If the ROC crossover our Sensitivty input - Then create an Order Block
if ta.crossover(pc, sens)
ob_created_bull := true
cross_index := bar_index
cross_index

// -------------------------------
// Bearish OB Creation
// -------------------------------
// Check if we should create a OB, Also check if we haven't created an OB in the
last 5 candles.
if ob_created and cross_index - cross_index[1] > 5
float last_green = 0
float highest = 0
// Loop through the most recent candles and find the first GREEN (Bullish)
candle. We will place our OB here.
for i = 4 to 15 by 1
if close[i] > open[i]
last_green := i
break
// Draw our OB on that candle - then push the box into our box arrays.
drawShortBox := box.new(left=bar_index[last_green], top=high[last_green],
bottom=low[last_green], right=bar_index[last_green], bgcolor=col_bearish_ob,
border_color=col_bearish, extend=extend.right)
array.push(shortBoxes, drawShortBox)

// -------------------------------
// Bullish OB Creation
// -------------------------------
// Check if we should create a OB, Also check if we haven't created an OB in the
last 5 candles.
if ob_created_bull and cross_index - cross_index[1] > 5
float last_red = 0
float highest = 0
// Loop through the most recent candles and find the first RED (Bearish)
candle. We will place our OB here.
for i = 4 to 15 by 1
if close[i] < open[i]
last_red := i
break
// Draw our OB on that candle - then push the box into our box arrays.
drawlongBox := box.new(left=bar_index[last_red], top=high[last_red],
bottom=low[last_red], right=bar_index[last_red], bgcolor=col_bullish_ob,
border_color=col_bullish, extend=extend.right)
array.push(longBoxes, drawlongBox)

// ----------------- Bearish Order Block -------------------


// Clean up OB boxes and place alerts
if array.size(shortBoxes) > 0
for i = array.size(shortBoxes) - 1 to 0 by 1
sbox = array.get(shortBoxes, i)
top = box.get_top(sbox)
bot = box.get_bottom(sbox)
// If the two last closes are above the high of the bearish OB - Remove the
OB
if OBBearMitigation > top
array.remove(shortBoxes, i)
box.delete(sbox)

// ----------------- Bullish Clean Up -------------------


// Clean up OB boxes and place alerts
if array.size(longBoxes) > 0
for i = array.size(longBoxes) - 1 to 0 by 1
sbox = array.get(longBoxes, i)
bot = box.get_bottom(sbox)
top = box.get_top(sbox)
// If the two last closes are below the low of the bullish OB - Remove the
OB
if OBBullMitigation < bot
array.remove(longBoxes, i)
box.delete(sbox)
////////////////////////////////////////////////////////////////////////////////
//--------------------------NEURAL-NETRORK------------------------------------//
////////////////////////////////////////////////////////////////////////////////
price = plot(close, title='Close Line', color=color.new(color.blue, 0),
display=display.none)
////////////////////////////////////////////////////////////////////////////////
//TREND INDICATORS▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼
len111 = input.int(defval=200, minval=0, maxval=2000, title='Trend EMA Length',
group="Neural Network")
src111 = close
out111 = ta.ema(src111, len111)
ma111 = plot(out111, title='EMA 200', linewidth=5, color=color.new(color.blue, 0),
offset=0)
mabuy = out111 > out111[1]
masell = out111 < out111[1]
//5 EMAs////////////////////////////////////////////////////////////////////////
len1 = 9
src1 = close
out1 = ta.ema(src1, len1)
ema1color = out1 > out1[1] ? #00bcd4 : #e91e63
ema1 = plot(out1, title='EMA 9', linewidth=3, color=color.new(ema1color, 50),
offset=0)
fill(price, ema1, title='EMA 9 Fill', color=color.new(ema1color, 90),
editable=true)
len2 = 21
src2 = close
out2 = ta.ema(src2, len2)
ema2color = out2 > out2[1] ? #00bcd4 : #e91e63
ema2 = plot(out2, title='EMA 21', linewidth=3, color=color.new(ema2color, 50),
offset=0)
fill(price, ema2, title='EMA 21 Fill', color=color.new(ema2color, 90),
editable=true)
len3 = 55
src3 = close
out3 = ta.ema(src3, len3)
ema3color = out3 > out3[1] ? #00bcd4 : #e91e63
ema3 = plot(out3, title='EMA 55', linewidth=3, color=color.new(ema3color, 50),
offset=0, display=display.none)
fill(price, ema3, title='EMA 55 Fill', color=color.new(ema3color, 90),
editable=true)
len4 = 100
src4 = close
out4 = ta.ema(src4, len4)
ema4color = out4 > out4[1] ? #00bcd4 : #e91e63
ema4 = plot(out4, title='EMA 100', linewidth=3, color=color.new(ema4color, 50),
offset=0, display=display.none)
fill(price, ema4, title='EMA 100 Fill', color=color.new(ema4color, 90),
editable=true)
len5 = 200
src5 = close
out5 = ta.ema(src5, len5)
ema5color = out5 > out5[1] ? #00bcd4 : #e91e63
ema5 = plot(out5, title='EMA 200', linewidth=3, color=color.new(ema5color, 50),
offset=0, display=display.none)
fill(price, ema5, title='EMA 200 Fill', color=color.new(ema5color, 90),
editable=true)
//HMA///////////////////////////////////////////////////////////////////////////
len6 = 100
src6 = close
hma = ta.wma(2 * ta.wma(src6, len6 / 2) - ta.wma(src6, len6),
math.floor(math.sqrt(len6)))
hmacolor = close > hma ? #00bcd4 : #e91e63
plot(hma, title='HMA Line', color=color.new(hmacolor, 25), linewidth=6)
///////////////////////////////////////////////////////////////////////
//-------------------------DASHBOARD---------------------------------//
//////////////////////////////////////////////////////////////////////
showDashboard = input(true, "Show Dashboard", group="TREND DASHBOARD")
locationDashboard = input.string("Bottom Right", "Table Location", ["Top Right",
"Middle Right", "Bottom Right"], group="TREND DASHBOARD")
tableTextColor = input(color.white, "Table Text Color", group="TREND DASHBOARD")
tableBgColor = input(color.black, "Table Background Color", group="TREND
DASHBOARD")
sizeDashboard = input.string("Normal", "Table Size", ["Large", "Normal",
"Small"], group="TREND DASHBOARD")

var dashboard_loc = locationDashboard == "Top Right" ? position.top_right :


locationDashboard == "Middle Right" ? position.middle_right : locationDashboard ==
"Bottom Right" ? position.bottom_right : locationDashboard == "Top Center" ?
position.top_center : locationDashboard == "Middle Center" ? position.middle_center
: locationDashboard == "Bottom Center" ? position.bottom_center : locationDashboard
== "Top Left" ? position.top_left : locationDashboard == "Middle Left" ?
position.middle_left : position.bottom_left
var dashboard_size = sizeDashboard == "Large" ? size.large : sizeDashboard ==
"Normal" ? size.normal : sizeDashboard == "Small" ? size.small : size.normal
var dashboard = showDashboard ? table.new(dashboard_loc, 2, 15, tableBgColor,
#000000, 2, tableBgColor, 1) : na
dashboard_cell(column, row, txt, signal=false) => table.cell(dashboard, column,
row, txt, 0, 0, signal ? #ffffff : tableTextColor, text_size=dashboard_size)
dashboard_cell_bg(column, row, col) => table.cell_set_bgcolor(dashboard, column,
row, col)
if barstate.islast and showDashboard
dashboard_cell(0, 0 , "Market Info")
dashboard_cell(0, 1 , "Current Position")
dashboard_cell(0, 2 , "Current Trend")
dashboard_cell(0, 3 , "Timeframe")
dashboard_cell(0, 4 , "1 minute:")
dashboard_cell(0, 5 , "3 minutes:")
dashboard_cell(0, 6 , "5 minutes:")
dashboard_cell(0, 7 , "15 minutes:")
dashboard_cell(0, 8 , "30 minutes:")
dashboard_cell(0, 9, "1 Hour:")
dashboard_cell(0, 10, "2 Hours:")
dashboard_cell(0, 11, "4 Hours:")
dashboard_cell(0, 12, "Daily:")
dashboard_cell(1, 0 , "")
dashboard_cell(1, 1 , emaBull ? "Go Long" : "Go Short", true),
dashboard_cell_bg(1, 1, emaBull ? #009705 : #97000d)
dashboard_cell(1, 2 , emaBull ? "Bullish" : "Bearish", true),
dashboard_cell_bg(1, 2, emaBull ? #009705 : #97000d)
dashboard_cell(1, 3 , "Trends")
dashboard_cell(1, 4 , TF1Bull ? "Bullish" : "Bearish", true),
dashboard_cell_bg(1, 4 , TF1Bull ? #009705 : #97000d)
dashboard_cell(1, 5 , TF3Bull ? "Bullish" : "Bearish", true),
dashboard_cell_bg(1, 5 , TF3Bull ? #009705 : #97000d)
dashboard_cell(1, 6 , TF5Bull ? "Bullish" : "Bearish", true),
dashboard_cell_bg(1, 6 , TF5Bull ? #009705 : #97000d)
dashboard_cell(1, 7 , TF15Bull ? "Bullish" : "Bearish", true),
dashboard_cell_bg(1, 7 , TF15Bull ? #009705 : #97000d)
dashboard_cell(1, 8 , TF30Bull ? "Bullish" : "Bearish", true),
dashboard_cell_bg(1, 8 , TF30Bull ? #009705 : #97000d)
dashboard_cell(1, 9, TF60Bull ? "Bullish" : "Bearish", true),
dashboard_cell_bg(1, 9, TF60Bull ? #009705 : #97000d)
dashboard_cell(1, 10, TF120Bull ? "Bullish" : "Bearish", true),
dashboard_cell_bg(1, 10, TF120Bull ? #009705 : #97000d)
dashboard_cell(1, 11, TF240Bull ? "Bullish" : "Bearish", true),
dashboard_cell_bg(1, 11, TF240Bull ? #009705 : #97000d)
dashboard_cell(1, 12, TFDBull ? "Bullish" : "Bearish", true),
dashboard_cell_bg(1, 12, TFDBull ? #009705 : #97000d)
////////////////////////////////////////////////////////////////////////////////
// Alerts
// to automate put this in trendinview message:
{{strategy.order.alert_message}}
i_alert_txt_entry_long = input.text_area(defval = "", title = "Long Entry Message",
group = "Alerts")
i_alert_txt_entry_short = input.text_area(defval = "", title = "Short Entry
Message", group = "Alerts")

// Entries and Exits with TP/SL


if bull
//strategy.close("Short" , alert_message = i_alert_txt_exit_short)
strategy.entry("Long" , strategy.long , alert_message = i_alert_txt_entry_long)
strategy.exit("Close Long", from_entry = "Long", limit = tp1_y , stop = stop_y,
comment_loss = "Stop Loss", comment_profit = "Take Profit", qty_percent = 100)//,
alert_message = i_alert_txt_TP_long)
if bear
//strategy.close("Long" , alert_message = i_alert_txt_exit_long)
strategy.entry("Short" , strategy.short, alert_message =
i_alert_txt_entry_short)
strategy.exit("Close Short", from_entry = "Short", limit = tp1_y , stop =
stop_y, comment_loss = "Stop Loss", comment_profit = "Take Profit", qty_percent =
100)//, alert_message = i_alert_txt_TP_short)

//////////////////////////////////////////////////////////////////////////////
//WATERMARK
Watermark = table.new(position.bottom_left, 1, 4, border_width=3)
table.cell(Watermark, 0, 0, text='Super Scalper Strategy v3.3',
text_color=color.new(color.white, 85), text_size=size.huge)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy