ইএসএসএমএ

লেখক:চাওঝাং, তারিখ: ২০২২-০৫-১২ ১৫ঃ১৯ঃ৩৩
ট্যাগঃইএমএএসএমএডব্লিউএমএআরএমএএটিআর

ধারণাঃ

অনেকগুলি চলমান গড় পাওয়া যায়।

কিন্তু এর কার্যকারিতা ভিন্ন।

প্রবণতা নিশ্চিতকরণ এবং অনুসরণ করার জন্য অনেকগুলি চলমান গড়ের ভিন্নভাবে ব্যবহার করা প্রয়োজন।

এখানে ধারণাটি হল একটি সংমিশ্রণ চলমান গড় তৈরি করা, প্রতিটি এমএ টাইপকে প্রবণতা নিশ্চিত করার জন্য উচ্চতর ডিগ্রি প্রদানের জন্য ওজন করা যেতে পারে।

ওজনগুলি সেটিংসে কনফিগারযোগ্য এবং নমুনা হিসাবে 50 দৈর্ঘ্য ব্যবহার করা হয়েছে।

এটিআর ভালো ফলাফল দেয়নি, তাই এটিকে ঐচ্ছিক হিসেবে রাখা হয়েছে।

উৎস পরিবর্তন করা যেতে পারে।

সূচকটি বৃহত্তর সময়সীমার মধ্যে একটি ভাল প্রতিরোধের সমর্থন মান সরবরাহ করে। এবং একটি ব্রেকআউট এবং ভাঙ্গন নির্দেশ দেয়। অনুসরণ বেশিরভাগ কার্যকর।

সতর্কতা অবস্থা এমনভাবে তৈরি করা হয়েছে যাতে এটি সরাসরি ডিসকর্ডে পোর্ট করা যায়।

সতর্কতার জন্য নিজের বার্তা কনফিগার করতে হবে।

শুভ ট্রেডিং.

img


/*backtest
start: 2022-04-11 00:00:00
end: 2022-05-10 23:59:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © bhavishya

//@version=5
indicator("ESSMA", overlay=true)
//inputs
source = input(close, "Source", group="Source")
length1 = input(50, "Length1", group = "Length")


w1 = input.float(2.0, "SMA Weight", group="Weights")
w2 = input.float(2.0, "EMA Weight", group="Weights")
w3 = input.float(2.0, "WMA Weight", group="Weights")
w4 = input.float(2.0, "SMMA Weight", group="Weights")
w5 = input.float(2.0, "RMA Weight", group="Weights")


useatr = input.bool(false, "Use ATR", group="ATR")

atrLen    = input.int(title="ATR Length", defval=14, group="ATR")

// functions

smma(src, length) =>
	smma =  0.0
	smma := na(smma[2]) ? ta.sma(src, length) : (smma[2] * (length - 1) + src) / length
	smma

essma(src,length) => 
    essma = 0.0
    
    smma = smma(src * w4,length) 
    ema = ta.ema(src * w2, length) 
    sma = ta.sma(src * w1, length) 
    wma = ta.wma(src * w3, length) 
    rma = ta.rma(src * w5, length) 
    
    essma := (smma/w4+ema/w2+sma/w1 - wma/w3 - rma/w5 + open + close)/(3) 
    essma
// calucations

// atr and MAs

atr = ta.atr(atrLen)

usesource = useatr ? atr : source

essma1 = essma(usesource, length1)
sessma1 = ta.wma(essma1, length1)
// plots


p1 = plot(essma1, "ESSMA", color.green)

ps1 = plot(sessma1, "ESSMA Smooth", color.red)

bool up = na
bool down = na

if (ta.crossover(essma1,sessma1))
    up := true
    
    
if (ta.crossunder(essma1, sessma1))
    down := true
    
plotshape(up, style=shape.labelup, location = location.belowbar, color=color.lime, text="B", textcolor=color.black)
plotshape(down, style=shape.labeldown, location = location.abovebar, color=color.orange, text="S", textcolor=color.black)


// alerts

alertcondition(up, "ESSMA UP", '{"content":"ESSMA BUY @ {{close}}" : "{{ticker}} int : {{interval}} - essma : {{plot_0}} / sessma {{plot_1}}"}')
alertcondition(down, "ESSMA DOWN", '{"content":"ESSMA SELL @ {{close}}" : "{{ticker}} int : {{interval}} -  essma :{{plot_0}} /sessma : {{plot_1}}"}')

if up
    strategy.entry("Enter Long", strategy.long)
else if down
    strategy.entry("Enter Short", strategy.short)

সম্পর্কিত

আরো