یہ حکمت عملی K لائن کثیر سر کنڈلی لائن سگنل کی شناخت کے ذریعے ، MACD اشارے کے ساتھ مل کر رجحان کی سمت کا تعین کرتی ہے ، جس سے اسٹاک کی قیمتوں کا ٹریکنگ ممکن ہوتا ہے۔ بیل مارکیٹ میں ، جب کثیر سر کنڈلی لائن کی شکل ظاہر ہوتی ہے ، اور MACD پس منظر میں کثیر سر ہوتا ہے تو ، زیادہ داخل ہوتا ہے۔ MACD خالی سر ہونے کے بعد ، خالی پوزیشن باہر نکل جاتی ہے۔
اصل لائن سیگمنٹ سائز تناسب کا حساب لگائیں ، کثیر سر کنڈلی لائن کا تعین کریں۔ MACD اشارے کا حساب لگانا رجحان کی سمت کا فیصلہ کریں۔ جب MACD کثیر سر ہے ، تو اگر کثیر سر کنڈلی لائن سگنل ظاہر ہوتا ہے تو ، زیادہ اندراج کریں۔ اسٹاپ نقصان اور پوزیشن کا سائز ترتیب دیں۔ جب MACD خالی سر پر جاتا ہے تو باہر نکل جاتا ہے۔
موڈ کی شناخت کی شرائط کو مناسب طریقے سے نرم کیا جاسکتا ہے ، MACD پیرامیٹرز کو کم کیا جاسکتا ہے ، اور دیگر اشارے کو کنٹرول کرنے میں مدد مل سکتی ہے۔
اس حکمت عملی میں رجحانات کا اندازہ لگانے کے لئے شکل اور اشارے کو مربوط کیا گیا ہے ، جس سے مستحکم منافع حاصل کیا جاسکتا ہے۔ پیرامیٹرز ایڈجسٹمنٹ وغیرہ کے ذریعہ مزید بہتر ، یہ ایک عملی مقداری تجارتی حکمت عملی بن سکتی ہے۔
/*backtest
start: 2023-08-18 00:00:00
end: 2023-09-17 00:00:00
period: 3h
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/
// © FenixCapital
//@version=4
strategy("Starbux", overlay=true)
//VARIABLES
//Candlestick Variables
body=close-open
range=high-low
middle=(open+close)/2
abody=abs(body)
arange=abs(range)
ratio=abody/range
longcandle= (ratio>0.6)
bodytop=max(open, close)
bodybottom=min(open, close)
shadowtop=high-bodytop
shadowbottom=bodybottom-low
//Closing Variables
macd=macd(close,12,26,9)
[macdLine, signalLine, histLine] = macd(close, 12, 26, 9)
//plot(macdLine, color=color.blue)
//plot(signalLine, color=color.orange)
//plot(histLine, color=color.red, style=plot.style_histogram)
rsi=rsi(close,14)
sma50= sma(close,50)
sma200= sma(close,200)
exitrsi=rsi > 76
exitmacd=macdLine >0 and signalLine>0
//exitmacd=crossunder(macdLine,signalLine)
stopprice= crossunder(sma50,sma200)
//Candlestick Plotting
blh = (arange*0.33>=abody and close>open and shadowbottom>=abody*2 and shadowtop<=arange*0.1)
plotshape(blh, title= "Bullish Hammer", location=location.belowbar, color=color.lime, style=shape.arrowup, text="Bull\nHammer")
//beh = (arange*0.25>=abody and close<open and shadowtop>=abody*2 and shadowbottom<=arange*0.05)
//plotshape(beh, title= "Bearish Hammer", color=color.orange, style=shape.arrowdown, text="Bear\nHammer")
//bpu = (open>close and close>low and shadowbottom>2*abody)
//plotshape(bpu, title= "Black Paper Umbrella", color=color.red, style=shape.arrowdown, text="Black\nPaper\nUmbrella")
//Trend Signal
bull5= sma50 > sma200
bullmacd=macdLine>=0 and signalLine>=0
bearmacd=macdLine<= 0 and signalLine<=0
//Trading Algorithm
longCondition = blh and bearmacd and volume>volume[1]
if (longCondition)
strategy.order("Buy", true, 1, when=longCondition)
strategy.risk.max_position_size(10)
//strategy.risk.max_drawdown(25,strategy.percent_of_equity)
exitlong = exitmacd
if (exitlong)
strategy.close_all()