JavaScript version SuperTrend strategy

Author: 善, Created: 2020-04-29 12:09:15, Updated: 2020-04-29 12:12:12

JavaScript version SuperTrend strategy

There are many versions of the SuperTrend indicator on the TV. I found a relatively easy-to-understand algorithm and transplanted it. Compared with the SuperTrend indicator loaded on the TV chart of FMZ trading platform backtest system, I found a slight difference and did not understand the reason for the causes, I’m looking forward to the guidance of our readers. I will first show my understanding as follow.

Backtest performance

The K-line period is set to 15 minutes, and the SuperTrend parameter is set to 45, 3. Backtest the OKEX futures quarter contract for the most recent year, and set a contract to trade at a time. Due to the setting to trade only one contract at a time, the utilization rate of funds is very low and you don’t need to care about the Sharpe value.