एसएमए, ईएमए और वॉल्यूम पर आधारित सरल गति रणनीति


निर्माण तिथि: 2023-12-08 11:15:30 अंत में संशोधित करें: 2023-12-08 11:15:30
कॉपी: 8 क्लिक्स: 709
1
ध्यान केंद्रित करना
1621
समर्थक

एसएमए, ईएमए और वॉल्यूम पर आधारित सरल गति रणनीति

अवलोकन

यह रणनीति एक गैर-अस्थिर (केवल बहुमुखी, अस्थिर नहीं) की एक सरल दिन की गतिशीलता रणनीति है। यह एसएमए, ईएमए और लेन-देन की मात्रा के संकेतकों का उपयोग करके बाजार में सबसे अच्छे समय पर प्रवेश करने की कोशिश करता है (यानी जब कीमत और गतिशीलता एक साथ बढ़ती है) । इसका लाभ यह है कि यह सरल है और इसमें प्रवृत्ति की पहचान करने की क्षमता है।

रणनीति सिद्धांत

इस रणनीति के लिए ट्रेडिंग Einty सिग्नल उत्पन्न करने का तर्क यह है कि एसएमए संकेतक ईएमए संकेतक से अधिक है और लगातार 3 K लाइनों या 4 K लाइनों के साथ एक ऊपरी प्रवृत्ति का गठन होता है, और मध्यवर्ती K लाइन की न्यूनतम कीमत ऊपरी K लाइन की शुरुआत के उद्घाटन मूल्य से अधिक है।

Exit सिग्नल उत्पन्न करने का तर्क यह हैः जब SMA संकेतक के नीचे ईएमए संकेतक से गुजरता है तो Exit सिग्नल उत्पन्न होता है।

यह रणनीति केवल ओवरहेड करती है, ओवरहेड नहीं करती है। इसके प्रवेश और निकास तर्क में निरंतर वृद्धि की प्रवृत्ति की पहचान करने की क्षमता है।

श्रेष्ठता विश्लेषण

इस रणनीति के निम्नलिखित फायदे हैं:

  1. इस प्रकार, यह स्पष्ट है कि इस प्रकार की रणनीतियों का उपयोग करने के लिए कौन-कौन सी रणनीतियाँ हैं।

  2. SMA, EMA और लेन-देन की मात्रा जैसे सामान्य तकनीकी संकेतकों का उपयोग करके, पैरामीटर को समायोजित करने में लचीलापन;

  3. इस प्रकार, एक व्यक्ति के पास लगातार बढ़ते रुझानों की पहचान करने की क्षमता होती है, जिससे वह रुझानों में से कुछ अवसरों को पकड़ सकता है।

जोखिम विश्लेषण

इस रणनीति के साथ निम्नलिखित जोखिम भी हैं:

  1. यह भी कहा गया है कि बाजारों में गिरावट या समेकन की पहचान करने में असमर्थता के कारण बड़ी वापसी हो सकती है।

  2. एक अच्छा मुनाफा कमाने के अवसरों से वंचित रहने के कारण, जो कि मंदी के रुझानों के लिए एक प्रतिरक्षा के रूप में काम नहीं कर सकते हैं;

  3. उच्च आवृत्ति डेटा के लिए लेनदेन सूचकांक खराब है और पैरामीटर को समायोजित करने की आवश्यकता है;

  4. जोखिम को नियंत्रित करने के लिए स्टॉप लॉस का उपयोग करें।

अनुकूलन दिशा

इस रणनीति को निम्नलिखित पहलुओं से अनुकूलित किया जा सकता हैः

  1. मंदी के रुझानों का लाभ उठाने के लिए, शून्य-मुद्रा व्यापार के अवसरों को बढ़ाने के लिए, बहु-मुक्त द्वि-दिशात्मक व्यापार;

  2. अधिक परिष्कृत संकेतकों जैसे कि एमएसीडी, आरएसआई और अन्य के साथ संयोजन रणनीति का उपयोग करके प्रवृत्ति के बारे में निर्णय लेने की क्षमता में सुधार;

  3. स्टॉप लॉजिक को अनुकूलित करना और निकासी के जोखिम को कम करना;

  4. पैरामीटर को समायोजित करें, विभिन्न चक्रों के लिए डेटा का परीक्षण करें और सर्वोत्तम पैरामीटर संयोजन खोजें।

संक्षेप

इस रणनीति के समग्र रूप से एक बहुत ही सरल प्रवृत्ति ट्रैकिंग रणनीति है, एसएमए, ईएमए और लेन-देन की मात्रा के संकेतकों के माध्यम से प्रवेश के समय का न्याय. इसका लाभ यह है कि यह सरल और आसानी से लागू करने के लिए उपयुक्त है, शुरुआती सीखने के लिए उपयुक्त है, लेकिन संरेखण और गिरावट की प्रवृत्ति की पहचान नहीं कर सकता है, कुछ जोखिम है।

रणनीति स्रोत कोड
/*backtest
start: 2023-11-07 00:00:00
end: 2023-12-02 00:00:00
period: 2h
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/
// © slip_stream

//@version=4

// Simple strategy for riding the momentum and optimising the timings of truer/longer price moves upwards for an long posistions on a daily basis (can be used, but with less effect
// on other time frames. Volume settings would have to be adjusted by the user accordingly. (short positions are not used).
// This strategy has default settings of a short(er) SMA of 10, a long(er) EMA of 20, and Volume trigger of 10 units and above. All these settings can be changed by the user
// using the GUI settings and not having to change the script.

// The strategy will only open a long position when there is a clear indication that price momentum is upwards through the SMA moving and remaining above the EMA (mandatory) and price period indicators
// of either 1) a standard 3 bar movement upwards, 2) a standard but "aggressive" 3 or 4 bar play where the low of the middle resting bars can be equal to or higher than (i.e. not
// the more standard low of about half) of the opening of the ignition bar. The "aggression" of the 3/4 bar play was done in order to counteract the conservatisme of having a mandatory
// SMA remaining higher than the EMA (this would have to be changed in the script by the user if they want to optimise to their own specifications. However, be warned, all programmatic
// settings for the maximum acceptable low of the middle resting bars runs a risk of ignoring good entry points due to the low being minutely e.g. 0.01%, lower than the user defined setting)


strategy(title = "Simple Momentum Strategy Based on SMA, EMA and Volume", overlay = true, pyramiding = 1, initial_capital = 100000, currency = currency.USD)


// Obtain inputs
sma_length = input(defval = 10, minval=1, type = input.integer, title = "SMA (small length)")
ema_length = input(defval = 20,minval=1, type = input.integer, title = "EMA (large length)")
volume_trigger = input(defval = 10, title = "Volume Trigger", type = input.integer)
sma_line = sma(close, sma_length)
ema_line = ema(close, ema_length)


// plot SMA and EMA lines with a cross for when they intersect
plot(sma_line, color = #8b0000, title = "SMA")
plot(ema_line, color = #e3d024, title = "EMA")
plot(cross(sma_line, ema_line) ? sma_line : na, style = plot.style_cross, linewidth = 4, color = color.white)


// Create variables
// variables to check if trade should be entered
//three consecutive bar bar moves upwards and volume of at least one bar is more than 10
enter_trade_3_bar_up = sma_line > ema_line and close[1] >= close [2] and close[3] >= close[4] and close[2] >= close[3] and (volume[1] >= volume_trigger or volume[2] >= volume_trigger or volume[3] >= volume_trigger)
// aggressive three bar play that ensures the low of the middle bar is equal to or greater than the open of the instigator bar. Volume is not taken into consideration (i.e. aggressive/risky)
enter_3_bar_play = sma_line > ema_line and close[1] > close[3] and low[2] >= open[3]
// aggressive four bar play similar to the 3 bar play above
enter_4_bar_play = sma_line > ema_line and close[1] > close[4] and low[2] >= open[4]
trade_entry_criteria = enter_trade_3_bar_up or enter_3_bar_play or enter_4_bar_play // has one of the trade entry criterias returned true?

// exit criteria for the trade: when the sma line goes under the ema line
trade_exit_criteria = crossunder (sma_line, ema_line)


if (year >= 2019)
    strategy.entry(id = "long", long = true, qty = 1, when = trade_entry_criteria)
    strategy.close(id = "long", when = trade_exit_criteria, qty = 1)
    // for when you want to brute force close all open positions: strategy.close_all (when = trade_exit_criteria)