یہ حکمت عملی رجحان کی واپسی کے ٹریڈنگ کے تصور پر مبنی ہے ، جس میں تین اشارے آر ایس آئی ، اسٹوک اور ایم اے سی ڈی کے ذریعہ موجودہ رجحان کا اندازہ لگایا گیا ہے ، جس میں اے ٹی آر کے ساتھ اسٹاپ نقصان کی پوزیشن قائم کی گئی ہے ، جس میں رجحان کی واپسی کو موثر انداز میں پکڑنے کے لئے خود کار طریقے سے ٹریڈنگ کی حکمت عملی ہے۔
اس حکمت عملی میں RSI ، اسٹوک اور MACD کے تین اشارے استعمال کیے گئے ہیں تاکہ موجودہ رجحان کی سمت کا اندازہ لگایا جاسکے۔ اس کی مخصوص منطق یہ ہے:
جب تین اشارے بیک وقت اوپر جاتے ہیں تو بار سبز ہوتا ہے۔ جب تین اشارے بیک وقت نیچے جاتے ہیں تو بار سرخ ہوتا ہے۔ اگر اشارے کے اشارے میں اختلاف ہے تو یہ سیاہ ہوتا ہے۔
تجارتی قوانین مندرجہ ذیل ہیں:
اس حکمت عملی میں اے ٹی آر ((7 دن کی اوسط لائن) کا استعمال بھی کیا گیا ہے۔ اس میں اسٹاپ نقصان کا مقام اے ٹی آر کا 1.5 گنا اور اسٹاپ نقصان کا مقام اے ٹی آر کا 3 گنا ہے۔
اس حکمت عملی کے درج ذیل فوائد ہیں:
ایک سے زیادہ اشارے کا استعمال کرتے ہوئے رجحان کا تعین کرنے کے لئے ، جعلی توڑ کو مؤثر طریقے سے فلٹر کیا جاسکتا ہے۔ جب RSI ، Stoch اور MACD تینوں اشارے بیک وقت اوپر یا نیچے جاتے ہیں تو ، اس کا امکان رجحان کا رخ موڑنے کا ہے۔
اے ٹی آر اسٹاپ نقصان کی روک تھام کی ترتیب بہتر ہے۔ اے ٹی آر مارکیٹ میں اتار چڑھاؤ کی سطح کو مؤثر طریقے سے ٹریک کرسکتا ہے ، اے ٹی آر کے متعدد اسٹاپ نقصان کی روک تھام کا استعمال کرتا ہے ، جو مارکیٹ کے حالات کے مطابق اسٹاپ نقصان کی روک تھام کو ایڈجسٹ کرسکتا ہے ، تاکہ اس سے بچنے کے لئے کہ اسٹاپ نقصان بہت زیادہ نرمی یا بہت تنگ ہو۔
ٹریڈنگ کی منطق سادہ اور واضح ہے ، آسانی سے سمجھنے کے قابل ہے ، جو خود کار طریقے سے ٹریڈنگ کی حکمت عملی کے طور پر استعمال کیا جاسکتا ہے۔
اس حکمت عملی میں مندرجہ ذیل خطرات بھی ہیں:
کثیر اشارے کے مجموعے کا فیصلہ اس صورت میں ہوسکتا ہے کہ انفرادی اشارے غلط سگنل بھیجیں ، جس سے داخلے کے وقت پر اثر پڑتا ہو۔ اس کی جانچ پڑتال کے لئے اشارے کے پیرامیٹرز کو ایڈجسٹ کرنے یا دیگر اشارے شامل کرنے پر غور کیا جاسکتا ہے ، تاکہ غلط سگنل کی شرح کو کم کیا جاسکے۔
اے ٹی آر کا سائز اسٹاپ نقصان کی روک تھام پر زیادہ اثر انداز ہوتا ہے۔ اگر اے ٹی آر کا حساب کتاب درست نہیں ہے تو ، اس سے اسٹاپ نقصان بہت بڑا یا اسٹاپ بہت چھوٹا ہوسکتا ہے۔ اے ٹی آر کے سائز کی تصدیق کے لئے دوسرے اشارے شامل کرنے پر غور کیا جاسکتا ہے۔
رجحان کا فیصلہ نہ کرنا۔ اس حکمت عملی میں الٹا تجارت پر توجہ دی گئی ہے ، رجحان کا فیصلہ ناقص ہے ، اور یہ ہنگامہ خیز حالات میں قید ہے۔ رجحان کے اشارے میں معاون فیصلہ شامل کیا جاسکتا ہے۔
اوور فٹ ہونے کا خطرہ ہے۔ پیرامیٹرز اور قواعد کی وشوسنییتا کی توثیق کے لئے کافی جانچ پڑتال کی جانی چاہئے۔
یہ حکمت عملی مندرجہ ذیل پہلوؤں سے بہتر ہو سکتی ہے:
ٹرینڈ الٹ پوائنٹس کی تعیناتی کی درستگی کو بہتر بنانے کے لئے اشارے کو ایڈجسٹ یا بڑھانا۔ مثال کے طور پر ، بولین لائن میں شامل ہونے سے اوور بیئر اور اوور سیل کی حیثیت کا تعین ہوتا ہے۔
اے ٹی آر کے حساب کتاب کے طریقہ کار کو بہتر بنانا تاکہ مارکیٹ میں اتار چڑھاؤ کو بہتر طور پر ٹریک کیا جاسکے۔ مثال کے طور پر اے ٹی آر کا استعمال قیمت کے تناسب کے لئے کیا جاتا ہے۔
رجحان کا فیصلہ کرنے والے اشارے میں اضافہ کریں ، اور اتار چڑھاؤ کی صورتحال میں پھنسنے سے بچیں۔ مثال کے طور پر ، رجحان کی سمت کا فیصلہ کرنے کے لئے ایک چلتی اوسط شامل کریں۔
فنڈز کے انتظام کو بہتر بنانا ، مثال کے طور پر واپسی کی صورت حال کے مطابق پوزیشن کو ایڈجسٹ کرنا۔
مختلف ٹائم پیکیج پیرامیٹرز کی استحکام کی توثیق کرنے کے لئے سائیکل کی اصلاح کریں۔
مزید پرجاتیوں اور ٹائم فریموں میں ریٹرننگ، حکمت عملی کی مستحکم وشوسنییتا کی جانچ پڑتال.
یہ حکمت عملی رجحان الٹا کرنے کی حکمت عملی کے ڈیزائن پر مبنی ہے ، جس میں رجحان الٹا کرنے کے وقت کا تعین کرنے کے لئے آر ایس آئی ، اسٹوک اور ایم اے سی ڈی کے جوڑے کا استعمال کیا گیا ہے ، جس میں اے ٹی آر متحرک اسٹاپ نقصان کی رکاوٹ کی ترتیب کے ساتھ کام کیا گیا ہے۔ اس حکمت عملی میں رجحان الٹا کرنے کی ایک مکمل حکمت عملی تشکیل دی گئی ہے۔ حکمت عملی میں ٹریڈنگ منطق کی وضاحت ، اسٹاپ نقصان کی رکاوٹ کی مناسب ترتیب وغیرہ کے فوائد ہیں ، لیکن اس میں اشارے کے غلط سگنل ، رجحان کے فیصلے کی کمی وغیرہ کی کمی ہے۔ مستقبل میں اشارے کے پیرامیٹرز کو بہتر بنانے ، رجحان کے فیصلے میں شامل ہونے ، فنڈ مینجمنٹ کو ایڈجسٹ کرنے وغیرہ میں بہتری کی جاسکتی ہے ، تاکہ حکمت عملی کو زیادہ مستحکم اور قابل اعتماد بنایا جاسکے۔
/*backtest
start: 2023-09-06 00:00:00
end: 2023-10-06 00:00:00
period: 2h
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/
// © jwitt98
//The PowerX strategy - based on the rules outlined in the book "The PowerX Strategy: How to Trade Stocks and Options in Only 15 Minutes a Day" by Markus Heitkoetter
//@version=5
strategy("PowerX", overlay=true)
strategy.initial_capital = 50000
longEntry = "Enter long"
shortEntry = "Enter short"
longExit = "Exit long"
shortExit = "Exit short"
//*********************************Begin inputs*********************************
//get time range inputs and set time range bool
timeRangeGroup = "Select the trading range"
startDate = input(timestamp("1 Jan 2021 00:00 +0000"), "Start date", "Select the start date for the trading range", "", timeRangeGroup)
endDate = input(timestamp("1 Jan 2050 00:00 +0000"), "End date", "Select the end date for the trading range", "", timeRangeGroup)
isInTimeRange = true
//get long/short inputs
positionsAllowedGroup = "Select the direction(s) of trades to allow"
isLongsAllowed = input.bool(true, "Allow long positions", "Check the box if you want to allow long positions", "", positionsAllowedGroup)
isShortsAllowed = input.bool(true, "Allow short positions", "Check the box if you want to allow short positions", "", positionsAllowedGroup)
//get the stop loss and profit target multiples. Per the PowerX rules the ratio shoud be 1:2. 1.5 and 3 are defaults
adrMultuplesGroup="Select the multipliers for the stop loss and profit targets"
stopLossMultiple = input.float(1.5, "Stop loss multiple", 0.1, 10, 0.1, "The ADR is multiplied by the stop loss multiple to calculate the stop loss", group=adrMultuplesGroup)
profitTargetMultiple=input.float(3.0, "Profit target multiple", 0.1, 10, 0.1, "The ADR is multiplied by the profit target multiple to calculate the profit target", group=adrMultuplesGroup)
//get the option to use the money management stategy or not. This is a fixed ratio type management system
moneyManagementGroup="Money management"
isUsingMoneyManagement=input.bool(false, "Use money management", "Check the box if you want to use a fixed ratio type money management system, such as the type described in PowerX", group=moneyManagementGroup)
initial_riskPercent=input.float(2.0, "Percent risk per trade", .1, 100, .1, "The percentage of capital you want to risk when starting out. This will increase or decrease base on the money management rules. Only applicable if money managent is used", group=moneyManagementGroup)/100
isRiskDowsideLimited=input.bool(false, "Keep risk at or above the set point", "Check the box if you don't want the risk to fall below the set \"risk per trade\" percentage, for example, when your equity is underwater. Only applicable if money management is used", "", moneyManagementGroup)
initial_riskPerTrade=initial_riskPercent * strategy.initial_capital
riskFactor = 0.0
currentProfit = 0.0
currentRisk = 0.0
//*********************************End inputs*********************************
//*********************************Begin money management*********************************
if(isUsingMoneyManagement)
currentProfit := strategy.equity - strategy.initial_capital
if(currentProfit < 0)
currentProfit:=math.abs(currentProfit)
riskFactor := 0.5*(math.pow(1+8*currentProfit/(2*initial_riskPerTrade), 0.5)+1)
currentRisk := 1/riskFactor * initial_riskPercent * strategy.initial_capital
if(isRiskDowsideLimited)
currentRisk := initial_riskPerTrade
else
riskFactor := 0.5*(math.pow(1+8*currentProfit/(2*initial_riskPerTrade), 0.5)+1)
currentRisk := riskFactor * initial_riskPercent * strategy.initial_capital
plot(strategy.equity, "Strategy equity")
plot(currentRisk, "Current risk")
plot(riskFactor, "Risk Factor")
//*********************************End money management*********************************
//*********************************Begin indicators*********************************
//4 indicators are used in this strategy, RSI(7), Stochastics(14, 3, 3), MACD(12, 26, 9), and ADR(7)
rsiVal = ta.rsi(close, 7)//this checks out
plot(rsiVal, "RSI(7)", color.lime)
stochKVal = ta.sma(ta.sma(ta.stoch(close, high, low, 14),3),3)//this formula checks out
plot(stochKVal, "Stoch %K", color.lime)
[macdLine, signalLine, histLine] = ta.macd(close, 12, 26, 9)
plot(histLine, "MACD Hist", color.lime)
adr = ta.sma(high, 7) - ta.sma(low, 7)
plot(adr, "Average daily range", color.orange)
//*********************************End indicators*********************************
//*********************************Define the bar colors*********************************
greenBar = rsiVal > 50 and stochKVal > 50 and histLine > 0
redBar = rsiVal < 50 and stochKVal < 50 and histLine < 0
blackBar = not greenBar and not redBar
color currentBarColor = switch
greenBar => color.green
redBar => color.red
blackBar => color.gray //because black is too hard to see in dark mmode
=> color.yellow
barcolor(currentBarColor)
//*********************************End defining the bar colors*********************************
//*********************************Define the entry, stop loss and profit target*********************************
longStopLimit = high + .01
longProfitTarget = high + (profitTargetMultiple * adr)
longStopLoss = high - (stopLossMultiple * adr)
shortStopLimit = low - .01
shortProfitTarget = low - (profitTargetMultiple * adr)
shortStopLoss = low + (stopLossMultiple * adr)
qtyToTrade= math.floor(currentRisk / (stopLossMultiple * adr))//only if using money management
if(qtyToTrade * high > strategy.equity)
qtyToTrade := math.floor(strategy.equity / high)
//*********************************End defining stop loss and profit targets*********************************
//*********************************Execute trades, set rules, stop loss and profit targets*********************************
if (greenBar and not greenBar[1] and isInTimeRange and isLongsAllowed)
if(isUsingMoneyManagement)
strategy.order(longEntry, strategy.long, qtyToTrade, limit=longStopLimit, stop=longStopLimit)
//strategy.order(longEntry, strategy.long, qtyToTrade, stop=longStopLimit)
else
strategy.order(longEntry, strategy.long, limit=longStopLimit,stop=longStopLimit)
//strategy.order(longEntry, strategy.long, stop=longStopLimit)
strategy.exit("Long limit/stop", from_entry=longEntry, limit=longProfitTarget, stop=longStopLoss)
if(blackBar or redBar)
strategy.cancel(longEntry)
strategy.close(longEntry, longExit)
if (redBar and not redBar[1] and isInTimeRange and isShortsAllowed)
if(isUsingMoneyManagement)
strategy.order(shortEntry, strategy.short, qtyToTrade, limit=shortStopLimit, stop=shortStopLimit)
//strategy.order(shortEntry, strategy.short, qtyToTrade, stop=shortStopLimit)
else
strategy.order(shortEntry, strategy.short, limit=shortStopLimit, stop=shortStopLimit)
//strategy.order(shortEntry, strategy.short, stop=shortStopLimit)
strategy.exit("Short limit/stop", from_entry=shortEntry, limit=shortProfitTarget, stop=shortStopLoss)
if(blackBar or greenBar)
strategy.cancel(shortEntry)
strategy.close(shortEntry, shortExit)
//*********************************End execute trades, set rules, stop loss and profit targets*********************************