
এই কৌশলটি একটি সরল চলমান গড়ের উপর ভিত্তি করে একটি ক্রস-মিডল লাইন বিপরীতকরণ কৌশল। এটি 1 এবং 5 দৈর্ঘ্যের সরল চলমান গড় ব্যবহার করে, যখন সংক্ষিপ্ত সময়ের চলমান গড়গুলি নীচে থেকে দীর্ঘ সময়ের চলমান গড়গুলি অতিক্রম করে এবং শূন্য হয় যখন এটি উপরে থেকে নীচে অতিক্রম করে, এটি একটি সাধারণ প্রবণতা-অনুসরণ কৌশল।
এই কৌশলটি 1 দিনের সরল চলমান গড় sma1 এবং 5 দিনের সরল চলমান গড় sma5 গণনা করে, sma1 এর উপরে sma5 পরিধান করে এবং sma1 এর নীচে sma5 পরিধান করে। স্টপ লসটি প্রবেশের দামের নীচে 5 ডলার এবং স্টপ লসটি প্রবেশের দামের উপরে 150 ডলার এবং স্টপ লসটি প্রবেশের দামের উপরে 5 ডলার এবং স্টপ লসটি প্রবেশের দামের নীচে 150 ডলার।
অনুকূলিতকরণঃ
এই কৌশলটি একটি সহজ দ্বৈত সমান্তরাল কৌশল হিসাবে কাজ করে, যা সহজেই পরিচালনা করা যায়, সহজেই বাস্তবায়িত হয়, কৌশলগত ধারণাটি দ্রুত যাচাই করতে পারে। তবে এর সহনশীলতা এবং লাভের স্থানটি তুলনামূলকভাবে সীমিত, প্যারামিটার এবং ফিল্টার শর্তগুলির অপ্টিমাইজেশনের প্রয়োজন, যাতে এটি আরও বাজার পরিবেশের সাথে খাপ খাইয়ে নিতে পারে। শিক্ষানবিশদের জন্য প্রথম পরিমাণযুক্ত কৌশল হিসাবে, এটি মৌলিক উপাদানগুলি ধারণ করে, যা একটি সহজ কাঠামো হিসাবে পুনরাবৃত্তিমূলক উন্নতি করতে পারে।
/*backtest
start: 2023-02-19 00:00:00
end: 2024-02-19 00:00:00
period: 2d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Valeria 181 Bot Strategy Mejorado 2.21", overlay=true, margin_long=100, margin_short=100)
var float lastLongOrderPrice = na
var float lastShortOrderPrice = na
longCondition = ta.crossover(ta.sma(close, 1), ta.sma(close, 5))
if (longCondition)
strategy.entry("Long Entry", strategy.long) // Enter long
shortCondition = ta.crossunder(ta.sma(close, 1), ta.sma(close, 5))
if (shortCondition)
strategy.entry("Short Entry", strategy.short) // Enter short
if (longCondition)
lastLongOrderPrice := close
if (shortCondition)
lastShortOrderPrice := close
// Calculate stop loss and take profit based on the last executed order's price
stopLossLong = lastLongOrderPrice - 5 // 10 USDT lower than the last long order price
takeProfitLong = lastLongOrderPrice + 151 // 100 USDT higher than the last long order price
stopLossShort = lastShortOrderPrice + 5 // 10 USDT higher than the last short order price
takeProfitShort = lastShortOrderPrice - 150 // 100 USDT lower than the last short order price
// Apply stop loss and take profit to long positions
strategy.exit("Long Exit", from_entry="Long Entry", stop=stopLossLong, limit=takeProfitLong)
// Apply stop loss and take profit to short positions
strategy.exit("Short Exit", from_entry="Short Entry", stop=stopLossShort, limit=takeProfitShort)