Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the thermostat Strategy in My language

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "how to implement thermostat strategy in My language". In the operation of practical cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Why do you call it a thermostat? We name the system according to its adaptability to switching and trading in market, volatility and trend modes. The system stems from our observation of the success of specific systems in specific market areas. This system can create dual-nature strategies to make full use of the two modes of the market.

First, we create a function to help determine the market pattern. According to the output of this function, the thermostat switches from follow mode to short-term wobble mode.

The trend tracking pattern uses a trend tracking mechanism similar to that in the Bollinger belt. Short-term wobble system is an open breakthrough including pattern recognition. This function compares the distance the market wanders with the actual distance the market travels:

Abs (closing price-closing price [29]) / (highest price (30)-lowest price (low, 30 days) * 100

This function generates a value between 0 and 100. The higher the value, the less crowded the current market is. If the value returned by the function is less than 20, the system enters short-term wobble mode.

Basically, most of the market is showing a wobble, and the system tries to catch the volatility and make a meagre profit from it. Thermostats try to achieve this feat by buying / selling small market impulses. If the fluctuation is large enough, the system will switch modes.

Through an in-depth analysis of short-term fluctuations, we find that sometimes buying is better than selling, and vice versa. These times can be determined by simple visual patterns. If today's closing price is higher than yesterday's high, low and closing price (also known as the key point of the day), then we think tomorrow's market action may be bearish. However, if today's closing price is lower than yesterday's high, low and average closing price, then today's market may be bullish. We classify these times as prices that are easier to buy and sell.

In the inventor quantification platform, the thermostat strategy is a very popular strategy. Users add some additional transaction logic according to their own needs to make the strategy perform better. The following is a typical framework of the thermostat strategy in the inventor quantification platform:

Main picture:

On-track formula: top ^ MAC + Native TMPTMP-on-track / Bollinger channel on track

Lower track formula: BOTTOM ^ MAC-Numeric TMPTMPTP / Bollinger Channel Lower Rail

Secondary picture:

CMI Formula: CMI:ABS (C-REF (CMagnetics CMI Must1) / (HHV (Hrecinception CMI)-LLV (LMNCMI)) * 100. The larger the value of, the stronger the trend, and the stronger the trend, the stronger the trend.

Code (My language):

MAC:=MA (CLOSE,N); TMP:=STD (CLOSE,N); top ^ Mac + Null TMPs; / / Boottom ^ BBOLL:=C on Bollinger channels > MAC;SBOLL:=CD AND DBKPRICE* (1+0.01*STOPLOSS*3) AND K = 20 AND C > TOP; / / trend Multi-buy flat SELLPK2:=CMI > = 20 TMPs

< BOTTOM; // 趋势空单卖平开// 趋势模式下原有震荡持仓的处理SELLY2:=REF(CMI,BARSBK) >

= 20 AND C > BKPRICE* (1+0.01*STOPLOSS*3) AND SBOLL;// trend multiple single stop BUYY2:=REF (CMI,BARSSK) > = 20 AND C = 20 AND C = 20 AND C > SKPRICE* (1+0.01*STOPLOSS) AND BBOLL;// trend empty single stop IF BARPOS > N THEN BEGINBUYPK1,BPK;SELLPK1,SPK;BUYPK2,BPK;SELLPK2,SPK;ENDBUYY1,BP (SKVOL); BUYY2,BP (SKVOL); BUYS2,BP (SKVOL); SELLY1,SP (BKVOL); SELLY2,SP (BKVOL); SELLS2,SP (BKVOL)

The back test results of this strategy are as follows:

This is the end of the content of "how to realize the thermostat strategy in My language". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report