এই কৌশলটি দামের চলমান গড় এবং স্ট্যান্ডার্ড ডিফারেনশিয়াল চ্যানেল গণনা করে, গতিশীল উত্থান-পতন গঠন করে এবং সর্বোচ্চ এবং সর্বনিম্ন দামের গড়ের সাথে মিলিত হয়, যাতে বর্তমান প্রবণতার দিক নির্ণয় করা যায়। যখন দাম উত্থান-পতন করে তখন বিপরীতমুখী হয়, যখন দাম পতন-পতন করে তখন বিপরীতমুখী হয়, প্রবণতা পরিবর্তনের উপর ভিত্তি করে বাণিজ্য করার কৌশলটি বাস্তবায়ন করে।
এই কৌশলটির সামগ্রিক চিন্তাভাবনাটি পরিষ্কার এবং সহজেই বোঝা যায়, গতিশীল চ্যানেলের মাধ্যমে প্রবণতা ক্যাপচার করে এবং একাধিক মধ্যপথে নকশার সাথে একত্রিত হয়ে ট্রেডিং সিগন্যাল তৈরি করে, যাতে ট্রেডিংয়ের জন্য প্রবণতার দিকটি কার্যকরভাবে অনুসরণ করা যায় এবং আরও ভাল ট্রেডিং রিটার্ন পাওয়া যায়। বাস্তবে, স্টপ লস কৌশল, তহবিল পরিচালনা এবং প্যারামিটারগুলির জন্য অপ্টিমাইজেশনের বিষয়ে মনোযোগ দেওয়া প্রয়োজন, যাতে দীর্ঘমেয়াদী স্থিতিশীল আয় অর্জন করা যায়।
/*backtest
start: 2023-09-10 00:00:00
end: 2023-10-10 00:00:00
period: 4h
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/
// © ErdemDemir
//@version=4
strategy("Lawyers Trend Pro Strategy", shorttitle="Lawyers Trend Pro Strategy", overlay=true)
src = close
mult = 2.0
basis = sma(src, 20)
dev = mult * stdev(src, 20)
upper = basis + dev
lower = basis - dev
offset = 0
lower2 = lowest(20)
upper2 = highest(20)
basis2 = avg(upper2, lower2)
MB= (basis+basis2)/2
col1=close>MB
col3=MB>close
colorE = col1 ? color.blue : col3 ? color.red : color.yellow
p3=plot(MB, color=colorE, linewidth=3)
// Deternine if we are currently LONG
isLong = false
isLong := nz(isLong[1], false)
// Determine if we are currently SHORT
isShort = false
isShort := nz(isShort[1], false)
// Buy only if the buy signal is triggered and we are not already long
buySignal = not isLong and crossover(close,MB)
// Sell only if the sell signal is triggered and we are not already short
sellSignal= not isShort and crossover(MB,close)
if (buySignal)
isLong := true
isShort := false
if (sellSignal)
isLong := false
isShort := true
/// LONG
strategy.entry("long", true , when = buySignal, comment="Open Long")
strategy.close("long", when=sellSignal, comment = "Close Long")
/// SHORT
strategy.entry("short", false, when = sellSignal, comment="Open Short")
strategy.close("short", when=buySignal, comment = "Close Short")