Professional Documents
Culture Documents
Özel Bir Indikatör Serisi
Özel Bir Indikatör Serisi
// Disclaimer:
// 1. I am not licensed financial advisors or broker dealers. I do not tell you
// when or what to buy or sell. I developed this software which enables you
// execute manual or automated trades using TradingView. The
// software allows you to set the criteria you want for entering and exiting
// trades.
// 2. Do not trade with money you cannot afford to lose. I am not accountable
for any losses.
// 3. I do not guarantee consistent profits or that anyone can make money with
no
// effort. And I am not selling the holy grail.
// 4. Every system can have winning and losing streaks.
// 5. Money management plays a large role in the results of your trading. For
// example: lot size, account size, broker leverage, and broker margin call
// rules all have an effect on results. Also, your Take Profit and Stop Loss
// settings for individual pair trades and for overall account equity have a
// major impact on results. If you are new to trading and do not understand
// these items, then I recommend you seek education materials to further your
// knowledge.
// Edited and constructed by TradeTactics, TP/SL and alert signals provided by War-
Jackel
// DEMA concept shared by Grant
// If this helped you and if you are able consider sending a tip
// BTC (BTC Network): 18wQFct5yhWDMhVvEM1m8b41EgvecAxhhJ
// USDT (ERC20): 0xaaf28ebb293aadfebe519a2888639d40c39419ef
strategy("Double EMA Strategy", "DEMA ATR Strategy", overlay=true,
default_qty_type=strategy.percent_of_equity, default_qty_value=100,
commission_value = 0.05)
showTrade = input.bool(false, 'Show TP/SL')
showBB = input.bool(false, "Show Bollinger Bands")
//Inputs
//Formulas
basis = ta.sma(src, length5)
dev = ta.stdev(src, length5)
dev2 = mult * dev
//Plots
pBasis = plot(showBB ? basis : na, linewidth=2, color=colorBasis)
pUpper1 = plot(showBB ? upper1 : na, color=color.new(color.blue, 0),
style=plot.style_circles)
pUpper2 = plot(showBB ? upper2 : na, color=color.new(color.blue, 0))
pLower1 = plot(showBB ? lower1 : na, color=color.new(color.orange, 0),
style=plot.style_circles)
pLower2 = plot(showBB ? lower2 : na, color=color.new(color.orange, 0))
// Using the input stop/ limit percent, we can convert to ticks and use the ticks
to level functions.
// This can be used to calculate the take profit and stop levels.
float sl = css.ticksToStopLevel (css.percentToTicks (percentStop))
float tp = css.ticksToTpLevel (css.percentToTicks (percentTP))
exitPrice = strategy.closedtrades.exit_price(strategy.closedtrades-1)
bias = math.sign(strategy.position_size)
avg = strategy.position_avg_price
//STRATEGY PLOTS {
avgerage = plot(showTrade ? avg : na, "ENTRY", not enter ?
color.new(color.white, 0) : na, 2, plot.style_linebr)
slp = plot(showTrade ? sl : na, "STOP LOSS", not enter ?
color.new(color.red, 60) : na, 4, plot.style_linebr)
tpp = plot(showTrade ? tp : na, "TAKE PROFIT", not enter ?
color.new(color.green, 60) : na, 4, plot.style_linebr)
// Create entries based on the cross conditions for both trades biases.
if longCondition and inDateRange
strategy.close("SHORT", "SX" , alert_message=i_alert_txt_exit_short)
strategy.entry("LONG", strategy.long, alert_message=i_alert_txt_entry_long)