
এই কৌশলটি সূচকের ভিডাব্লুএপি (ব্যবহারের ওজনযুক্ত গড় মূল্য) ব্যবহার করে প্রবেশ এবং প্রস্থান সংকেত হিসাবে। যখন বন্ধের দামটি ভিডাব্লুএপি অতিক্রম করে তখন এটি বেশি হয়, স্টপ লসটি ভিডাব্লুএপি এর নীচে পূর্ববর্তী কে-লাইনের নিম্নতম স্থানে স্থাপন করা হয় এবং টার্গেট মূল্যটি খোলার দামের উপরে 3 পয়েন্ট স্থাপন করা হয়। যখন বন্ধের দামটি ভিডাব্লুএপি অতিক্রম করে তখন এটি খালি হয়ে যায়, স্টপ লসটি ভিডাব্লুএপি এর উপরে পূর্ববর্তী কে-লাইনের উচ্চতম স্থানে স্থাপন করা হয় এবং টার্গেট মূল্যটি খোলার দামের নীচে 3 পয়েন্ট স্থাপন করা হয়। এই কৌশলটি কোনও প্রস্থান শর্ত অন্তর্ভুক্ত করে না এবং বিপরীত সিগন্যাল না হওয়া পর্যন্ত এটি বজায় থাকে।
VWAP ডেটা দ্বারা প্রবণতা নির্ধারণ করা, গতিশীল স্টপ লস এবং ফিক্সড পয়েন্ট স্টপস ব্যবহার করে, প্রবণতা কার্যকরভাবে নিয়ন্ত্রণ করতে, প্রত্যাহারের ঝুঁকি নিয়ন্ত্রণ করতে এবং সময়মত মুনাফা লক করতে পারে।
এই কৌশলটি ট্রান্স-সাইক্লিক ভিডাব্লুএপি ডেটা ব্যবহার করে প্রবণতা বিচার এবং সংকেত ট্রিগার করার জন্য, যখন গতিশীল স্টপ লস এবং ফিক্সড পয়েন্ট স্টপ লস পদ্ধতি ব্যবহার করে ঝুঁকি নিয়ন্ত্রণ এবং মুনাফা লক করার জন্য, এটি একটি সহজ এবং কার্যকর পরিমাণগত ট্রেডিং কৌশল। প্রবণতা ফিল্টারিং, গতিশীল স্টপ লস, অবস্থান পরিচালনা এবং ট্রেডিং সময় নির্বাচন ইত্যাদির অপ্টিমাইজেশনের মাধ্যমে কৌশলটির স্থিতিশীলতা এবং উপার্জনের সম্ভাবনা আরও বাড়িয়ে তুলতে পারে। তবে বাস্তবিক প্রয়োগে, বাজারের বৈশিষ্ট্য, লেনদেনের ব্যয় এবং প্যারামিটার অপ্টিমাইজেশন ইত্যাদির মতো বিষয়গুলিতে মনোযোগ দেওয়া প্রয়োজন।
/*backtest
start: 2024-03-06 00:00:00
end: 2024-03-07 00:00:00
period: 45m
basePeriod: 5m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy('Pine Script Tutorial Example Strategy 1', overlay=true, initial_capital=1000, default_qty_value=100, default_qty_type=strategy.percent_of_equity)
// fastEMA = ta.ema(close, 24)
// slowEMA = ta.ema(close, 200)
// Higher Time Frame
float sl = na
float tgt = na
posSize = 1
vwap_1d = request.security(syminfo.tickerid, "1D", ta.vwap(close))
// plot(vwap_1d)
// To avoid differences on historical and realtime bars, you can use this technique, which only returns a value from the higher timeframe on the bar after it completes:
// indexHighTF = barstate.isrealtime ? 1 : 0
// indexCurrTF = barstate.isrealtime ? 0 : 1
// nonRepaintingVWAP = request.security(syminfo.tickerid, "1D", close[indexHighTF])[indexCurrTF]
// plot(nonRepaintingVWAP, "Non-repainting VWAP")
enterLong = ta.crossover(close, vwap_1d)
exitLong = ta.crossunder(close, vwap_1d)
enterShort = ta.crossunder(close, vwap_1d)
exitShort = ta.crossover(close, vwap_1d)
if enterLong
sl := low[1]>vwap_1d ?low[1]:vwap_1d
tgt:=close+3
strategy.entry("EL", strategy.long, qty=posSize)
strategy.exit('exitEL', 'EL', stop=sl, limit=tgt)
if enterShort
sl := high[1]<vwap_1d ?high[1]:vwap_1d
tgt := close-3
strategy.entry("ES", strategy.short, qty=posSize)
strategy.exit('exitES', 'ES', stop=sl, limit=tgt)
// if exitLong
// strategy.close("EL")
// if exitShort
// strategy.close("ES")
// goLongCondition1 = ta.crossover(close, vwap_1d)
// timePeriod = time >= timestamp(syminfo.timezone, 2021, 01, 01, 0, 0)
// notInTrade = strategy.position_size <= 0
// if goLongCondition1 and timePeriod and notInTrade
// stopLoss = low[1]
// takeProfit = close+3
// strategy.entry('long', strategy.long)
// strategy.exit('exit', 'long', stop=stopLoss, limit=takeProfit)
plot(close, color=color.new(#00c510, 0))
plot(vwap_1d, color=color.new(#f05619, 0))
plot(sl, color=color.new(#fbff00, 0))
plot(tgt, color=color.new(#00e1ff, 0))