
এই কৌশলটি হল একটি পিভট পয়েন্টের উপর ভিত্তি করে গড় মূল্যের রিটার্ন ট্রেডিং সিস্টেম। এটি সাপ্তাহিক সমর্থন (S1-S4) এবং প্রতিরোধ (R1-R4) গণনা করে ট্রেডিং প্রবেশ এবং প্রস্থান নির্ধারণ করে। কৌশলটি ধাপে ধাপে পজিশনিং পদ্ধতি গ্রহণ করে, বিভিন্ন সমর্থন পয়েন্টের মধ্যে একাধিক ক্রয় করে এবং প্রতিরোধের সাথে সাথে মুনাফা অর্জন করে। এই পদ্ধতিটি বাজারের অস্থিরতার বৈশিষ্ট্যগুলিকে পুরোপুরি ব্যবহার করে, যা হিজড়া বাজারে ভাল কাজ করে।
কৌশলটির মূল অংশটি হ’ল পূর্ববর্তী সপ্তাহের সর্বোচ্চ, সর্বনিম্ন এবং বন্ধের দামের মাধ্যমে এই সপ্তাহের মূল পয়েন্টগুলি গণনা করা, তারপরে একাধিক সমর্থন এবং প্রতিরোধের স্থানগুলি নির্ধারণ করা, যা পূর্ববর্তী পয়েন্টের দূরত্বের উপর ভিত্তি করে। যখন দাম সমর্থন স্পর্শ করে তখন ক্রয় করা হয় এবং প্রাসঙ্গিক প্রতিরোধের স্থানগুলিতে মুনাফা অর্জনের লক্ষ্য নির্ধারণ করা হয়। মূল অক্ষ = (গত সপ্তাহের সর্বোচ্চ মূল্য + গত সপ্তাহের সর্বনিম্ন মূল্য + গত সপ্তাহের শেষ মূল্য) / 3 কৌশলটি একই সাথে সর্বাধিক 4 টি পজিশন ধারণ করার অনুমতি দেয়, প্রতিটি পজিশন বিভিন্ন সমর্থন এবং প্রতিরোধের সাথে সম্পর্কিত। সমস্ত পজিশন প্রতি সপ্তাহের শুরুতে নতুন লেনদেনের স্তর পুনরায় গণনা করে। এই নকশাটি লেনদেনের ধারাবাহিকতা নিশ্চিত করে এবং বাজারের পরিবর্তনের সাথে খাপ খাইয়ে নেয়।
এটি একটি ক্লাসিক টেকনিক্যাল অ্যানালিসিস থিওরির উপর ভিত্তি করে গড় মানের রিটার্ন কৌশল, যা প্রতিরোধের স্থানের সাথে ঘূর্ণনপথকে সমর্থন করে এবং ট্রেডিংয়ের সুযোগকে ক্যাপচার করে। কৌশলটি সহজ এবং নমনীয়ভাবে ডিজাইন করা হয়েছে, যা উচ্চতর ওঠানামাযুক্ত বাজারে প্রয়োগের জন্য উপযুক্ত। যুক্তিসঙ্গত প্যারামিটার অপ্টিমাইজেশন এবং ঝুঁকি পরিচালনার মাধ্যমে, কৌশলটি বিভিন্ন বাজার পরিবেশে স্থিতিশীল পারফরম্যান্স বজায় রাখতে সক্ষম। ব্যবসায়ীরা তাদের প্যারামিটার সেটিংটি ব্যবহারের আগে পুরোপুরি পরীক্ষা করার পরামর্শ দেয় এবং নির্দিষ্ট বাজারের বৈশিষ্ট্য অনুসারে যথাযথভাবে সামঞ্জস্য করে।
/*backtest
start: 2024-02-19 00:00:00
end: 2025-02-17 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © ViZiV
//@version=5
strategy("Weekly Pivot Strategy, Created by ViZiV", overlay=true, pyramiding=50, initial_capital=100000, default_qty_type=strategy.percent_of_equity, default_qty_value=25, dynamic_requests=true)
// This is my first COMPLETED strategy, go easy on me :) - Feel free to imrprove upon this script by adding more features if you feel up to the task. Im 100% confiedent there are better coders than me :) I'm still learning.
// This is a LONG ONLY SWING STRATEGY (Patience REQUIRED) that being said, you can go short at you're own discretion. I prefer to use on NQ / US100 / USTech 100 but not limited to it. Im sure it can work in most markets. "You'll need to change settings to suit you're market".
// IMPORTANT NOTE: "default_qty_type=strategy.percent_of_equity" Can be changed to "Contacts" within the properties tab which allow you to see backtest of other markets. Reccomend 1 contract but it comes to preference.
// Inputs for support/resistance distances (Defined by Points). // IMPORTANT NOTE: Completely user Defined. Figure out best settings for what you're trading. Each market is different with different characteristics. Up to you to figure out YOU'RE market volatility for better results.
s1_offset = input.float(155, "S1 Distance", step=1)
s2_offset = input.float(310, "S2 Distance", step=1)
s3_offset = input.float(465, "S3 Distance", step=1)
s4_offset = input.float(775, "S4 Distance", step=1)
r1_offset = input.float(155, "R1 Distance", step=1)
r2_offset = input.float(310, "R2 Distance", step=1)
r3_offset = input.float(465, "R3 Distance", step=1)
r4_offset = input.float(775, "R4 Distance", step=1)
// Weekly pivot calculation
var float pivot = na
var float s1 = na
var float s2 = na
var float s3 = na
var float s4 = na
var float r1 = na
var float r2 = na
var float r3 = na
var float r4 = na
// Get weekly data (Pivot Calculation)
prevWeekHigh = request.security(syminfo.tickerid, "W", high[1], lookahead=barmerge.lookahead_on)
prevWeekLow = request.security(syminfo.tickerid, "W", low[1], lookahead=barmerge.lookahead_on)
prevWeekClose = request.security(syminfo.tickerid, "W", close[1], lookahead=barmerge.lookahead_on)
// Track active trades
var array<string> entry_ids = array.new<string>(0)
var array<float> profit_targets = array.new<float>(0)
// Update weekly levels
isNewWeek = ta.change(time("W")) != 0
if isNewWeek or na(pivot)
pivot := (prevWeekHigh + prevWeekLow + prevWeekClose) / 3
s1 := pivot - s1_offset
s2 := pivot - s2_offset
s3 := pivot - s3_offset
s4 := pivot - s4_offset
r1 := pivot + r1_offset
r2 := pivot + r2_offset
r3 := pivot + r3_offset
r4 := pivot + r4_offset
// Plot current week's levels
plot(pivot, "Pivot", color=color.gray, linewidth=2)
plot(s1, "S1", color=color.blue, linewidth=1)
plot(s2, "S2", color=color.blue, linewidth=1)
plot(s3, "S3", color=color.blue, linewidth=1)
plot(s4, "S4", color=color.blue, linewidth=1)
plot(r1, "R1", color=color.red, linewidth=1)
plot(r2, "R2", color=color.red, linewidth=1)
plot(r3, "R3", color=color.red, linewidth=1)
plot(r4, "R4", color=color.red, linewidth=1)
// Function to create unique trade entries
checkEntry(level, target, entryNumber) =>
currentWeek = str.tostring(year(time)) + "_" + str.tostring(weekofyear(time))
entryId = "Entry" + str.tostring(entryNumber) + "_W" + currentWeek
if low <= level and not array.includes(entry_ids, entryId)
array.push(entry_ids, entryId)
array.push(profit_targets, target)
strategy.entry(entryId, strategy.long)
strategy.exit("Exit" + entryId, entryId, limit=target)
// Check all entry levels
checkEntry(s1, r1, 1)
checkEntry(s2, r2, 2)
checkEntry(s3, r3, 3)
checkEntry(s4, r4, 4)
// Clean up completed trades using while loop
i = array.size(entry_ids) - 1
while i >= 0
entryId = array.get(entry_ids, i)
target = array.get(profit_targets, i)
if high >= target
array.remove(entry_ids, i)
array.remove(profit_targets, i)
i := i - 1