
ٹرینڈ اشارے اور مخصوص K لائن کی شکل پر مبنی ٹریڈنگ کی حکمت عملی ، جس میں ٹرینڈ کو توڑنے کی حکمت عملی کو درست طریقے سے پکڑنا ہے۔ اس حکمت عملی میں اوسط لائن کا استعمال کرتے ہوئے رجحان کی سمت کا تعین کیا گیا ہے ، RSI اشارے نے اوور خرید اوور فروخت کا تعین کیا ہے ، جبکہ اعلی درجے کی K لائن کی شکل کے ساتھ مل کر ، ٹرینڈ کی جگہ کا تعین کرنے ، مناسب وقت پر توڑنے کی تجارت کرنے اور اضافی منافع حاصل کرنے کے لئے۔
8 ویں ای ایم اے اور 80 ویں ای ایم اے کا استعمال کرتے ہوئے رجحان کی سمت کا تعین کریں۔ 8 ویں ای ایم اے کو 80 ویں ای ایم اے کے اوپر بولی کے طور پر بیان کیا گیا ہے ، اور اس کے برعکس ، اس کی قیمت میں کمی ہے۔ تجارتی سگنل کو صرف اس وقت غور کیا جائے جب رجحان کی سمت اس کے مطابق ہو۔
تینوں K لائنوں کی ایک خاص مجموعہ کی شکل کی وضاحت کریں ، یعنی پہلی K لائن کی کم قیمت دوسری سے کم ہے ، اور تیسری K لائن کی کم قیمت دوسری سے کم ہے۔ یہ شکل ایک خرید سگنل کے طور پر ظاہر ہوتی ہے جب یہ ایک بڑھتی ہوئی رجحان میں ہوتا ہے۔ جب ایک گرتی ہوئی رجحان ہوتا ہے تو فروخت سگنل کے طور پر۔
تیسری K لائن اندرونی K لائن بن جاتی ہے ، یعنی جب بندش کی قیمت پچھلی K لائن کے اندر ہوتی ہے تو ، بہترین سگنل پوائنٹ کے طور پر۔ اس وقت 123 کی شکل ظاہر ہوتی ہے تو براہ راست تجارتی کمیشن لگایا جاسکتا ہے۔
ٹرانسفر کی قیمت تیسری K لائن کی اونچائی ((خریداری) یا تیسری K لائن کی کم قیمت ((فروخت)) ہے۔ اسٹاپ نقصان دوسری K لائن کی کم قیمت ((خریداری) یا دوسری K لائن کی اونچائی ((فروخت)) ہے۔ اسٹاپ مارجن دوگنا خطرہ قیمت کا فرق ہے۔
جب رجحان ، شکل ، اور اشارے کی شرائط پوری ہوجائیں تو ، ایک بریک ٹرانسمیشن لگائیں ، اعلی امکانات کی تجارت کریں۔ اور منافع کو مقفل کرنے کے لئے اسٹاپ نقصان کی روک تھام قائم کریں ، تاکہ ایک مضبوط بریک آپریشن ہو۔
اس حکمت عملی کے درج ذیل نمایاں فوائد ہیں۔
ڈبل ای ایم اے کا استعمال کرتے ہوئے بڑے رجحانات کی سمت کا تعین کریں اور منفی تجارت سے بچیں۔
K لکیری شکلوں کو فلٹر کریں جس کی وجہ سے منافع کی امکانات میں اضافہ ہوتا ہے۔
صرف رجحان، شکل اور قیمت کے فرق کے اشارے کے مطابق سگنل جاری کریں ، تاکہ سگنل کی معیار کو یقینی بنایا جاسکے۔
اندرونی K لائن کی شکل سگنل کی وشوسنییتا کو بہتر بناتی ہے ، جس سے تجارت کا وقت مزید لاک ہوجاتا ہے۔
پہلے سے طے شدہ اسٹاپ نقصان کی روک تھام کی پوزیشن ، انفرادی تجارت کے خطرے کو مؤثر طریقے سے کنٹرول کرتی ہے۔
ریٹائرمنٹ کے اعداد و شمار کی توثیق، جیت کی شرح 65 فیصد سے زائد ہے، طویل مدتی منافع بخش کے لئے اعداد و شمار کے فوائد کے ساتھ.
مجموعی طور پر ، اس حکمت عملی میں رجحانات ، شکلوں اور اشارے کے مجموعی فیصلے کا بھرپور استعمال کیا گیا ہے ، جس میں بریک ٹریڈنگ کے وقت کو درست طریقے سے نشانہ بنایا گیا ہے ، جس میں مستحکم خطرہ منافع کا فائدہ ہے۔
اس حکمت عملی کے اہم خطرات میں شامل ہیں:
رجحانات کی غلط فہمی ، زلزلے کی صورتحال میں غلط سگنل پیدا کرتی ہے۔ مزید رجحانات کے اشارے متعارف کروائے جاسکتے ہیں تاکہ کثیر جہتی تصدیق کی جاسکے۔
ایک واحد سٹاپ نقصان روکنے کا طریقہ ہر صورت حال کے لئے کامل فٹ نہیں ہوسکتا ہے۔ آپ کو فلوٹنگ سٹاپ نقصان روکنے کا مقام مقرر کیا جاسکتا ہے۔
K لکیری شکل کی شناخت پیرامیٹرز کی ترتیب پر منحصر ہے ، جس میں بہترین مجموعہ تلاش کرنے کے لئے بار بار اصلاح کی ضرورت ہے۔
اچانک بڑے بلیک سوان واقعات کی تجارت پر اثر انداز ہونے کی پیش گوئی نہیں کی جاسکتی ہے۔ پوزیشن کنٹرول کو اپنانے کی سفارش کی جاتی ہے ، اور پوزیشنوں کو بیچوں میں قائم کیا جاتا ہے۔
ریٹائرمنٹ کے اعداد و شمار حقیقی تجارت کی کارکردگی کی نمائندگی نہیں کرسکتے ہیں ، اور اس سے زیادہ فٹ ہونے کا خطرہ ہے۔ پیرامیٹرز کی مضبوطی کو سختی سے تصدیق کی جانی چاہئے۔
ہائی فریکوئینسی ٹریڈنگ کی حکمت عملی پر ٹریڈنگ کی لاگت کا بہت زیادہ اثر پڑتا ہے۔ اس بات کو یقینی بنائیں کہ جیت کی شرح اور منافع نقصان کی شرح لاگت کی حمایت کرنے کے لئے کافی ہے۔
مجموعی طور پر ، اس حکمت عملی میں پیرامیٹرز کی تشکیل کو بہتر بنانے ، زیادہ سے زیادہ عدالتی جہتوں کو متعارف کرانے ، پوزیشن کے سائز کو کنٹرول کرنے اور دیگر طریقوں سے ، خطرے کو کم کرنے اور کارکردگی کی استحکام کو بہتر بنانے میں مدد مل سکتی ہے۔
اس حکمت عملی میں اب بھی کچھ قابل اصلاح پہلو ہیں:
زیادہ سے زیادہ K لائن دورانیہ پیرامیٹرز کی جانچ کریں اور زیادہ مستحکم پیرامیٹرز کا مجموعہ طے کریں۔
کثیر جہتی توثیق کے لئے ٹرانزیکشن کی پیمائش میں اضافہ ، جعلی توڑ سے بچنے کے لئے
بڑھتی ہوئی شارپ کی شرح، جیت نقصان کی شرح اور اس طرح کے اشارے کی جانچ پڑتال کے پیرامیٹرز کی مضبوطی.
اسٹاپ اسٹاپ ٹریکنگ کا تعارف ، متحرک منافع کی واپسی کو کنٹرول کرنے کے لئے
مارکیٹ میں غیر یقینی صورتحال سے بچنے کے لئے VIX Panic Index کا استعمال کریں۔
مختلف ہولڈنگ سائیکل پیرامیٹرز کی جانچ اور بہترین ہولڈنگ وقت کی تاثیر کا تعین کرنا۔
سٹاپ نقصان کے نظام کو بہتر بنائیں تاکہ اسٹیٹک اسٹاپ نقصان کو پہلے سے طے شدہ طور پر غیر مستحکم نہ بنایا جاسکے۔
مندرجہ بالا ذرائع سے ، حکمت عملی کی استحکام ، لچک اور منافع بخش صلاحیت کو مزید بڑھایا جاسکتا ہے۔
درست رجحان توڑنے والی تجارتی حکمت عملی رجحان ، شکل اور نقصان کی روک تھام کے نامیاتی امتزاج کو کامیابی کے ساتھ استعمال کرتی ہے ، جس سے رجحان کے توڑنے کا ایک اعلی امکان ہوتا ہے۔ اس میں تجارتی سگنل کی وضاحت ، اشارے کی تصدیق کی کثرت ، خطرے پر قابو پانے کی خصوصیات ہیں ، جو رجحان سازی کے لئے موزوں ایک موثر حکمت عملی ہے۔ مسلسل اصلاح اور بہتری کے ذریعہ ، اس حکمت عملی کو رجحان سے باخبر رہنے کے لئے پوزیشن مینجمنٹ کے لئے ایک طاقتور آلہ بننے کا امکان ہے۔ یہ تاجروں کو اضافی منافع کے اہم مواقع پر قبضہ کرنے کے لئے ایک اہم حوالہ فراہم کرتا ہے۔
/*backtest
start: 2022-11-01 00:00:00
end: 2023-10-14 05:20:00
period: 1d
basePeriod: 1h
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/
// © julianossilva
//@version=5
strategy(title="J2S Backtest: 123-Stormer Strategy",
shorttitle="J2S Backtest: 123-Stormer Strategy",
overlay=true, initial_capital=1000, default_qty_value=10,
default_qty_type = strategy.percent_of_equity, pyramiding=0)
// Initial Backtest Date Range
useStartDate = timestamp("01 Jan 2020 21:00:00")
useEndDate = timestamp("01 Jan 2023 21:00:00")
// User Inputs
SIGNAL_CONFIG = "BACKTEST: STORMER STRATEGY (123)"
longEntryInput = input.bool(defval=true, title="Long Entry", group=SIGNAL_CONFIG)
shortEntryInput = input.bool(defval=true, title="Short entry", group=SIGNAL_CONFIG)
thresholdForEntryInput = input.int(defval=3, title="Threshold on clandes for entry", group=SIGNAL_CONFIG)
insideBarStrategyTitle = "Only third candle inside bar is valid"
insideBarStrategyTip = "According to Stomer, it would be the best signal for the strategy"
insideBarStrategyInput = input.bool(defval=true, title=insideBarStrategyTitle, group=SIGNAL_CONFIG, tooltip=insideBarStrategyTip)
EMA_CONFIG = "BACKTEST: EXPONENTIAL MOVING AVERAGES"
sourceInput = input.source(defval=close, title="Source", inline="01", group=EMA_CONFIG)
emaTimeframeInput = input.timeframe("1W", title="Timeframe", inline="01", group=EMA_CONFIG)
emaOffsetInput = input.int(defval=8, title="Offset", inline="01", group=EMA_CONFIG)
fastEMALengthInput = input.int(defval=8, title="Fast EMA Length", inline="02", group=EMA_CONFIG)
useFastEMAInput = input.bool(defval=true, title="Use Fast EMA", inline="02", group=EMA_CONFIG)
slowEMALengthInput = input.int(defval=80, title="Slow EMA Length", inline="03", group=EMA_CONFIG)
useSlowEMAInput = input.bool(defval=true, title="Use Slow EMA", inline="03", group=EMA_CONFIG)
PERIOD_CONFIG = "BACKTEST: TIME PERIOD"
useDateFilterInput = input.bool(defval=true, title="Filter Date Range of Backtest", group=PERIOD_CONFIG)
backtestStartDateInput = input(defval=useStartDate, title="Start Date", group=PERIOD_CONFIG)
backtestEndDateInput = input(defval=useEndDate, title="End Date", group=PERIOD_CONFIG)
// Colors
bbBackgroundColor = color.rgb(33, 150, 243, 90)
candleColorDown = color.rgb(239, 83, 80, 80)
candleColorUp = color.rgb(38, 166, 154, 70)
insideBarColorDown = color.rgb(239, 83, 80, 40)
insideBarColorUp = color.rgb(38, 166, 154, 20)
downTrendColor = color.rgb(239, 83, 80, 80)
sidewaysTrendColor = color.rgb(252, 232, 131, 80)
upTrendColor = color.rgb(38, 166, 154, 80)
buySignalColor = color.lime
sellSignalColor = color.orange
// Candles
isCandleUp() => close > open
isCandleDown() => close <= open
barcolor(isCandleUp() ? candleColorUp : isCandleDown() ? candleColorDown : na)
// Exponential Moving Averages
fastEMA = request.security(syminfo.tickerid, emaTimeframeInput, ta.ema(sourceInput, fastEMALengthInput), barmerge.gaps_on, barmerge.lookahead_on)
currentFastEMA = request.security(syminfo.tickerid, emaTimeframeInput, ta.ema(sourceInput, fastEMALengthInput), barmerge.gaps_off, barmerge.lookahead_on)
previousFastEMA = request.security(syminfo.tickerid, emaTimeframeInput, ta.ema(sourceInput[1], fastEMALengthInput), barmerge.gaps_off, barmerge.lookahead_on)
slowEMA = request.security(syminfo.tickerid, emaTimeframeInput, ta.ema(sourceInput, slowEMALengthInput), barmerge.gaps_on, barmerge.lookahead_on)
currentSlowEMA = request.security(syminfo.tickerid, emaTimeframeInput, ta.ema(sourceInput, slowEMALengthInput), barmerge.gaps_off, barmerge.lookahead_on)
previousSlowEMA = request.security(syminfo.tickerid, emaTimeframeInput, ta.ema(sourceInput[1], slowEMALengthInput), barmerge.gaps_off, barmerge.lookahead_on)
// Trend Rules for Exponential Moving Averages
isSlowEMAUp() => currentSlowEMA > previousSlowEMA
isSlowEMADown() => currentSlowEMA < previousSlowEMA
isFastEMAUp() => currentFastEMA > previousFastEMA
isFastEMADown() => currentFastEMA < previousFastEMA
// Exponential Moving Average Colors
fastEMAColor = isFastEMAUp() ? upTrendColor : isFastEMADown() ? downTrendColor : sidewaysTrendColor
slowEMAColor = isSlowEMAUp() ? upTrendColor : isSlowEMADown() ? downTrendColor : sidewaysTrendColor
// Display Exponential Moving Averages
plot(useFastEMAInput ? fastEMA : na, offset=emaOffsetInput, color=fastEMAColor, title="Fast EMA", style=plot.style_line, linewidth=4)
plot(useSlowEMAInput ? slowEMA : na, offset=emaOffsetInput, color=slowEMAColor, title="Slow EMA", style=plot.style_line, linewidth=7)
// Price Trend
pricesAboveFastEMA() => low[2] > currentFastEMA and low[1] > currentFastEMA and low > currentFastEMA
pricesAboveSlowEMA() => low[2] > currentSlowEMA and low[1] > currentSlowEMA and low > currentSlowEMA
pricesBelowFastEMA() => high[2] < currentFastEMA and high[1] < currentFastEMA and high < currentFastEMA
pricesBelowSlowEMA() => high[2] < currentSlowEMA and high[1] < currentSlowEMA and high < currentSlowEMA
// Market in Bullish Trend
isBullishTrend() =>
if useFastEMAInput and useSlowEMAInput
pricesAboveFastEMA() and pricesAboveSlowEMA()
else if useFastEMAInput
pricesAboveFastEMA()
else if useSlowEMAInput
pricesAboveSlowEMA()
else
na
// Market in Bearish Trend
isBearishTrend() =>
if useFastEMAInput and useSlowEMAInput
pricesBelowFastEMA() and pricesBelowSlowEMA()
else if useFastEMAInput
pricesBelowFastEMA()
else if useSlowEMAInput
pricesBelowSlowEMA()
else
na
// Stormer Strategy (123)
isFirstCandleUp() => high[2] > high[1] and low[2] > low[1]
isFirstCandleDown() => high[2] < high[1] and low[2] < low[1]
isThirdCandleUp() => low > low[1]
isThirdCandleDown() => high < high[1]
isThirdCandleInsideBar() => high < high[1] and low > low[1]
// Buy Signal
isStormer123Buy() =>
if insideBarStrategyInput
longEntryInput and isFirstCandleUp() and isThirdCandleInsideBar() and isBullishTrend()
else
longEntryInput and isFirstCandleUp() and isThirdCandleUp() and isBullishTrend()
// Sell Signal
isStormer123Sell() =>
if insideBarStrategyInput
shortEntryInput and isFirstCandleDown() and isThirdCandleInsideBar() and isBearishTrend()
else
shortEntryInput and isFirstCandleDown() and isThirdCandleDown() and isBearishTrend()
// Backtest Time Period
inTradeWindow = true
isInTradeWindow() => inTradeWindow
isBacktestDateRangeOver() => not inTradeWindow and inTradeWindow[1]
// Backtest Price Parameters
highestPrice = ta.highest(high, 3)
lowestPrice = ta.lowest(low,3)
priceRange = highestPrice - lowestPrice
// Stormer Strategy (123): LONG
var myLongOrders = array.new_int(0)
longtEntryID = "Long Entry:\n" + str.tostring(bar_index)
longExitID = "Long Exit:\n" + str.tostring(bar_index)
stopLossInLong = lowestPrice + 0.01
takeProfitInLong = priceRange + high
longEntryHasBeenMet = isInTradeWindow() and isBullishTrend() and isStormer123Buy()
// Scheduling LONG entry
if longEntryHasBeenMet
array.push(myLongOrders, bar_index)
strategy.order(longtEntryID, strategy.long, stop=high)
strategy.exit(longExitID, longtEntryID, stop=stopLossInLong, limit=takeProfitInLong)
// In pine script, any order scheduled but not yet filled can be canceled.
// Once a order is filled, the trade is only finished with use of close or exit functions.
// As scheduled orders are not stored in the strategy.opentrades array, manual control is required.
for myOrderIndex = 0 to (array.size(myLongOrders) == 0 ? na : array.size(myLongOrders) - 1)
myLongOrder = array.get(myLongOrders, myOrderIndex)
if bar_index - myLongOrder == thresholdForEntryInput
longEntryID = "Long Entry:\n" + str.tostring(myLongOrder)
strategy.cancel(longEntryID)
// Stormer Strategy (123): SHORT
var myShortOrders = array.new_int(0)
shortEntryID = "Short Entry:\n" + str.tostring(bar_index)
shortExitID = "Short Exit:\n" + str.tostring(bar_index)
stopLossInShort = highestPrice + 0.01
takeProfitInShort = low - priceRange
shortEntryHasBeenMet = isInTradeWindow() and isBearishTrend() and isStormer123Sell()
// Scheduling SHORT entry
if shortEntryHasBeenMet
array.push(myShortOrders, bar_index)
strategy.order(shortEntryID, strategy.short, stop=low)
strategy.exit(shortExitID, shortEntryID, stop=stopLossInShort, limit=takeProfitInShort)
// In pine script, any order scheduled but not yet filled can be canceled.
// Once a order is filled, the trade is only finished with use of close or exit functions.
// As scheduled orders are not stored in the strategy.opentrades array, manual control is required.
for myOrderIndex = 0 to (array.size(myShortOrders) == 0 ? na : array.size(myShortOrders) - 1)
myShortOrder = array.get(myShortOrders, myOrderIndex)
if bar_index - myShortOrder == thresholdForEntryInput
shortEntryID := "Short Entry:\n" + str.tostring(myShortOrder)
strategy.cancel(shortEntryID)
// Close all positions at the end of the backtest period
if isBacktestDateRangeOver()
strategy.cancel_all()
strategy.close_all(comment="Date Range Exit")
// Display Signals
plotshape(series=longEntryHasBeenMet, title="123 Buy", style=shape.triangleup, location=location.belowbar, color=buySignalColor, text="123", textcolor=buySignalColor)
plotshape(series=shortEntryHasBeenMet, title="123 Sell", style=shape.triangledown, location=location.abovebar, color=sellSignalColor, text="123", textcolor=sellSignalColor)