
یہ حکمت عملی ایک خودکار تجارتی حکمت عملی ہے جس میں مارکیٹ کے رجحانات کا اندازہ لگانے کے لئے K لائن کے سائز اور رجحان کی حرکیات کے اشارے EMA کا استعمال کیا جاتا ہے۔ اس کا بنیادی خیال یہ ہے کہ بڑھتی ہوئی قیمتوں میں کمی کو روکنا اور نیچے کی قیمتوں میں زیادہ معاوضہ دینا ہے۔
اس حکمت عملی کا مجموعی نظریہ واضح اور سمجھنے میں آسان ہے ، جس میں دو خصوصیات نمایاں ہیں۔ مارکیٹ کی مرکزی سمت کا تعین کرنے کے لئے ایک سادہ EMABOLL اشارے کے ذریعہ ، K لائن اداروں نے مقامی ایڈجسٹمنٹ کا تعین کیا ، کم جذب اور اونچی اچھال کی اعلی کارکردگی کا مظاہرہ کیا۔ حکمت عملی کی استحکام زیادہ ہے ، خاص طور پر کریپٹوکرنسی میں عمدہ کارکردگی کا مظاہرہ کیا گیا ہے ، مزید جانچ اور اصلاح کے قابل ہے۔
/*backtest
start: 2023-10-23 00:00:00
end: 2023-11-22 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
//Author @divonn1994
strategy(title='Trend Follower Strategy v2 [divonn1994]', shorttitle='TrendFollowStrategyV2', overlay=false, pyramiding=0, default_qty_value=100, default_qty_type=strategy.percent_of_equity, precision=7, currency=currency.USD, commission_value=0.1, commission_type=strategy.commission.percent, initial_capital=100)
//Important Constants for Classifying Candle Size----------------------------------------------------------------------------------------------------------------------------------------------
timesBigger = 2
crumbSize = 1400
crumbSize2 = 2100
bigCandleSize = 3800
//Key Alerts and Classifications of Candle Size and EMAs---------------------------------------------------------------------------------------------------------------------------------------
emaAlert = ta.ema(close, 8) > ta.ema(open, 8) ? 1 : 0
CandleSize = close * 1 - open * 1
previousCandleSize = close[1] * 1 - open[1] * 1
greenCandle = close > open ? 1 : 0
previousGreenCandle = close[1] > open[1] ? 1 : 0
crumb = (greenCandle==1 and CandleSize<=crumbSize) or (greenCandle==0 and -CandleSize<=crumbSize) ? 1 : 0
bigCrumb = (greenCandle==1 and CandleSize<=crumbSize2 and CandleSize>crumbSize) or (greenCandle==0 and -CandleSize<=crumbSize2 and -CandleSize>crumbSize) ? 1 : 0
previousCandleIsSmallCrumb = (previousGreenCandle==1 and previousCandleSize<=crumbSize) or (previousGreenCandle==0 and -previousCandleSize<=crumbSize) ? 1 : 0
previousCandleIsBigCrumb = (previousGreenCandle==1 and previousCandleSize<=crumbSize2 and previousCandleSize>crumbSize) or (previousGreenCandle==0 and -previousCandleSize<=crumbSize2 and -previousCandleSize>crumbSize) ? 1 : 0
bigCandle = (greenCandle==1 and previousCandleIsBigCrumb==1 and CandleSize>=math.abs(timesBigger*previousCandleSize)) or (greenCandle==1 and previousCandleIsSmallCrumb==1 and CandleSize>=bigCandleSize) or (greenCandle==1 and previousCandleIsSmallCrumb==0 and previousCandleIsBigCrumb==0 and CandleSize>=math.abs(timesBigger*previousCandleSize)) ? 1 : 0
//Engine (Secret Sauce)------------------------------------------------------------------------------------------------------------------------------------------------------------------------
buy = (crumb==0 and bigCrumb==0 and greenCandle==0) or (greenCandle==1 and bigCandle==1) or (emaAlert==0) ? 0 : 1
//Strategy-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if ta.crossover(buy, 0.5)
strategy.entry('long', strategy.long, comment='long')
if ta.crossunder(buy, 0.5)
strategy.close('long')
//Plot Strategy Behavior-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
plot(buy, color=color.new(color.silver, 0))
plot(0.5, color=color.new(color.fuchsia, 0))