ایکویٹی وکر پر مبنی متحرک پوزیشن سائزنگ حکمت عملی

مصنف:چاؤ ژانگ، تاریخ: 2024-01-16 15:06:39
ٹیگز:

img

حکمت عملی کا جائزہ

اس حکمت عملی کا بنیادی خیال ایکویٹی وکر کے رجحان کی بنیاد پر پوزیشن کے سائز کو متحرک طور پر ایڈجسٹ کرنا ہے - مجموعی خطرہ پر قابو پانے کے ل profit منافع کے دوران پوزیشن کے سائز میں اضافہ اور نقصان کے دوران سائز میں کمی کرنا۔ حکمت عملی میں تجارتی سگنل کی نشاندہی کے لئے چینڈے مومنٹم اشارے ، سپر ٹرینڈ اشارے اور مومنٹم اشارے کا بھی امتزاج کیا گیا ہے۔

حکمت عملی کا نام

ایکویٹی وکر پر مبنی متحرک پوزیشن سائزنگ حکمت عملی

حکمت عملی منطق

اسٹریٹجی میں دو طریقے استعمال کیے جاتے ہیں تاکہ یہ معلوم کیا جاسکے کہ آیا ایکویٹی وکر نیچے کی طرف جارہا ہے: 1) ایکویٹی وکر کے تیز اور سست سادہ چلنے والے اوسط کا حساب لگائیں ، اگر تیز ایس ایم اے سست سے نیچے ہے تو ، اسے نیچے کا رجحان سمجھا جاتا ہے۔ 2) ایکویٹی وکر کا حساب اس کے اپنے طویل مدتی سادہ چلنے والے اوسط کے مقابلے میں لگائیں ، اگر ایکویٹی حرکت پذیر اوسط لائن سے نیچے ہے تو ، اسے نیچے کا رجحان سمجھا جاتا ہے۔

جب ایکویٹی وکر کے نیچے کے رجحان کا تعین کیا جاتا ہے تو ، پوزیشن کا سائز سیٹنگز کی بنیاد پر ایک خاص فیصد تک کم یا بڑھ جائے گا۔ مثال کے طور پر ، اگر 50٪ کمی مقرر کی جاتی ہے تو ، اصل 10٪ پوزیشن کا سائز 5٪ تک کم ہوجائے گا۔ یہ طریقہ کار مجموعی خطرہ پر قابو پانے کے ل profit منافع کے دوران پوزیشن کا سائز بڑھاتا ہے اور نقصان کے دوران سائز کم کرتا ہے۔

فوائد

  • مجموعی منافع / نقصان کا فیصلہ کرنے کے لئے ایکویٹی وکر کا استعمال کرتا ہے اور خطرے کو کنٹرول کرنے کے لئے متحرک طور پر پوزیشن کا سائز ایڈجسٹ کرتا ہے
  • داخلہ سگنل کی نشاندہی کرنے کے لئے متعدد اشارے کو یکجا کرنے سے جیت کی شرح میں اضافہ ہوسکتا ہے
  • پوزیشن ایڈجسٹمنٹ کے لئے حسب ضرورت پیرامیٹرز مختلف خطرے کے شوق کے مطابق

خطرات

  • منافع کے دوران پوزیشن کے سائز میں اضافہ کے ساتھ نقصان کو بڑھا دیا جا سکتا ہے
  • غیر مناسب پیرامیٹرز کی ترتیبات کی وجہ سے جارحانہ ایڈجسٹمنٹ
  • صرف پوزیشن سائزنگ ہی سسٹم کے خطرے سے مکمل طور پر بچ نہیں سکتی

بہتری کی ہدایات

  • مختلف پوزیشن ایڈجسٹمنٹ پیرامیٹرز کی جانچ کی تاثیر
  • ایکویٹی وکر رجحان کا تعین کرنے کے لئے دیگر اشارے آزمائیں
  • جیت کی شرح کو بہتر بنانے کے لئے اندراج کے حالات کو بہتر بنائیں

نتیجہ

اس حکمت عملی کا مجموعی منطق واضح ہے - یہ ایکویٹی وکر کی بنیاد پر پوزیشن کے سائز کو متحرک طور پر ایڈجسٹ کرتا ہے ، جس سے خطرہ کو مؤثر طریقے سے کنٹرول کرنے میں مدد ملتی ہے۔ جارحانہ چالوں کے خطرے سے بچنے کے لئے پیرامیٹرز اور اسٹاپ نقصان کی حکمت عملیوں کی مزید جانچ اور اصلاح کی ضرورت ہے۔


/*backtest
start: 2024-01-08 00:00:00
end: 2024-01-15 00:00:00
period: 3m
basePeriod: 1m
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/
// © shardison
//@version=5

//EXPLANATION
//"Trading the equity curve" as a risk management method is the 
//process of acting on trade signals depending on whether a system’s performance
//is indicating the strategy is in a profitable or losing phase.
//The point of managing equity curve is to minimize risk in trading when the equity curve is  in a downtrend. 
//This strategy has two modes to determine the equity curve downtrend:
//By creating two simple moving averages of a portfolio's equity curve - a short-term
//and a longer-term one - and acting on their crossings. If the fast SMA is below
//the slow SMA, equity downtrend is detected (smafastequity < smaslowequity).
//The second method is by using the crossings of equity itself with the longer-period SMA (equity < smasloweequity).
//When "Reduce size by %" is active, the position size will be reduced by a specified percentage
//if the equity is "under water" according to a selected rule. If you're a risk seeker, select "Increase size by %"
//- for some robust systems, it could help overcome their small drawdowns quicker.

strategy("Use Trading the Equity Curve Postion Sizing", shorttitle="TEC", default_qty_type = strategy.percent_of_equity, default_qty_value = 10, initial_capital = 100000)

//TRADING THE EQUITY CURVE INPUTS
useTEC           = input.bool(true, title="Use Trading the Equity Curve Position Sizing")
defulttraderule  = useTEC ? false: true
initialsize      = input.float(defval=10.0, title="Initial % Equity")
slowequitylength = input.int(25, title="Slow SMA Period")
fastequitylength = input.int(9, title="Fast SMA Period")
seedequity = 100000 * .10
if strategy.equity == 0
    seedequity
else
    strategy.equity
slowequityseed   = strategy.equity > seedequity ? strategy.equity : seedequity
fastequityseed   = strategy.equity > seedequity ? strategy.equity : seedequity
smaslowequity    = ta.sma(slowequityseed, slowequitylength)
smafastequity    = ta.sma(fastequityseed, fastequitylength)
equitycalc       = input.bool(true, title="Use Fast/Slow Avg", tooltip="Fast Equity Avg is below Slow---otherwise if unchecked uses Slow Equity Avg below Equity")
sizeadjstring    = input.string("Reduce size by (%)", title="Position Size Adjustment", options=["Reduce size by (%)","Increase size by (%)"])
sizeadjint       = input.int(50, title="Increase/Decrease % Equity by:")
equitydowntrendavgs = smafastequity < smaslowequity
slowequitylessequity = strategy.equity < smaslowequity

equitymethod = equitycalc ? equitydowntrendavgs : slowequitylessequity

if sizeadjstring == ("Reduce size by (%)")
    sizeadjdown = initialsize * (1 - (sizeadjint/100))
else
    sizeadjup = initialsize * (1 + (sizeadjint/100))
c = close
qty = 100000 * (initialsize / 100) / c
if useTEC and equitymethod
    if sizeadjstring == "Reduce size by (%)"
        qty := (strategy.equity * (initialsize / 100) * (1 - (sizeadjint/100))) / c
    else
        qty := (strategy.equity * (initialsize / 100) * (1 + (sizeadjint/100))) / c
    
//EXAMPLE TRADING STRATEGY INPUTS
CMO_Length = input.int(defval=9, minval=1, title='Chande Momentum Length')
CMO_Signal = input.int(defval=10, minval=1, title='Chande Momentum Signal')

chandeMO = ta.cmo(close, CMO_Length)
cmosignal = ta.sma(chandeMO, CMO_Signal)

SuperTrend_atrPeriod = input.int(10, "SuperTrend ATR Length")
SuperTrend_Factor = input.float(3.0, "SuperTrend Factor", step = 0.01)
Momentum_Length = input.int(12, "Momentum Length")
price = close

mom0 = ta.mom(price, Momentum_Length)
mom1 = ta.mom( mom0, 1)
[supertrend, direction] = ta.supertrend(SuperTrend_Factor, SuperTrend_atrPeriod)
stupind = (direction < 0 ? supertrend : na)
stdownind = (direction < 0? na : supertrend)

//TRADING CONDITIONS
longConditiondefault = ta.crossover(chandeMO, cmosignal) and (mom0 > 0 and mom1 > 0 and close > stupind) and defulttraderule
if (longConditiondefault)
    strategy.entry("DefLong", strategy.long, qty=qty)

shortConditiondefault = ta.crossunder(chandeMO, cmosignal) and (mom0 < 0 and mom1 < 0 and close < stdownind) and defulttraderule
if (shortConditiondefault)
    strategy.entry("DefShort", strategy.short, qty=qty)
    
longCondition = ta.crossover(chandeMO, cmosignal) and (mom0 > 0 and mom1 > 0 and close > stupind) and useTEC
if (longCondition)
    strategy.entry("AdjLong", strategy.long, qty = qty)

shortCondition = ta.crossunder(chandeMO, cmosignal) and (mom0 < 0 and mom1 < 0 and close < stdownind) and useTEC
if (shortCondition)
    strategy.entry("AdjShort", strategy.short, qty = qty)
plot(strategy.equity)
plot(smaslowequity, color=color.new(color.red, 0))
plot(smafastequity, color=color.new(color.green, 0))

مزید