PROTECTED SOURCE SCRIPT

buy & sell

//version=5
indicator("Smoothed Heiken Ashi with Signals", " איתותי קנייה + איתותי מכירה", overlay=true, timeframe="", timeframe_gaps=true)

import wallneradam/TAExt/8

//
// User inputs
//
ha_smooth_length = input.int(10, "Smooth Length", minval=1, group="Before HA")
ha_smooth_ma_type = input.string('EMA', 'MA Type', options=['SMA', 'EMA', 'WMA', "VWMA", "RMA", "DEMA", "TEMA", "ZLEMA", "HMA", "ALMA", "LSMA", "SWMA", "SMMA", "JMA", "DONCHIAN", "ATRWSMA", "ATRWEMA", "ATRWRMA", "ATRWWMA"], group="Before HA")
ha_after_smooth_length = input.int(10, "After Smooth Length", minval=1, group="After HA")
ha_after_smooth_ma_type = input.string('EMA', 'After MA Type', options=['SMA', 'EMA', 'WMA', "VWMA", "RMA", "DEMA", "TEMA", "ZLEMA", "HMA", "ALMA", "LSMA", "SWMA", "SMMA", "JMA", "DONCHIAN", "ATRWSMA", "ATRWEMA", "ATRWRMA", "ATRWWMA"], group="After HA")

//
// Calculation
//
[o, h, l, c] = TAExt.heiken_ashi(smooth_length=ha_smooth_length, smooth_ma_type=ha_smooth_ma_type, after_smooth_length=ha_after_smooth_length)

//
// Support level calculation based on the last 14 candles
//
supportLevel = ta.lowest(l, 14)

//
// Buy/Sell Signals
//
buySignal = ta.crossover(c, o) // Close crosses above Open
sellSignal = ta.crossunder(c, o) // Close crosses below Open

//
// Buy Signal 2 - After returning near support
//
buySignal2 = ta.crossover(c, o) and (l <= supportLevel or l - supportLevel < 0.005 * supportLevel)

//
// Plotting
//
plotcandle(o, h, l, c, title="Smoothed Heiken Ashi",
color=o > c ? color.new(color.red, 60) : color.new(color.lime, 60),
wickcolor=o > c ? color.new(color.red, 20) : color.new(color.lime, 20),
bordercolor=o > c ? color.new(color.red, 10) : color.new(color.lime, 10))

// Plot Buy Signals
plotshape(series=buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")

// Plot Sell Signals
plotshape(series=sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")

// Plot Buy Signal 2
plotshape(series=buySignal2, title="Buy Signal 2", location=location.belowbar, color=color.blue, style=shape.labelup, text="BUY2")
Bands and Channelsbuy-sellsignalsCyclesVolume

Skrip dilindungi

Skrip ini diterbitkan secara sumber tertutup dan anda boleh menggunakannya dengan bebas. Anda boleh menyukainya untuk menggunakannya pada carta. Anda tidak dapat melihat atau mengubah kod sumbernya.

Ingin menggunakan skrip ini pada carta?

Penafian