Strategy vault / Trend following
Calibration Value or Moving Average Crossover Strategy
Benchmark value Sell if the high point btc 10000 MA(10) < MA(30).; Buy if the mid support point < btc 6725 MA(10) MA(30).; StoplossStop-loss point set at 8, 8%. Cycle according to daily line. Backtest data is…
Benchmark value
Sell if the high point > btc 10000 || MA(10) < MA(30).;
Buy if the mid support point < btc 6725 || MA(10) > MA(30).;
StoplossStop-loss point set at 8, 8%.
Cycle according to daily line. Backtest data is acceptable; backtest data below the daily cycle is poor..
This strategy uses trend indicators.
*Take10000and6725The reason is based on Gann's idea.

Parameters
| Name | Default | What it controls |
|---|---|---|
| HGH | 10000 | High point |
| MMD | 6725 | Core point |
| STOPLOSS | 8 | Stop-loss quantity |
Source MyLanguage
(*backtest
start: 2019-01-05 00:00:00
end: 2020-02-29 00:00:00
period: 1d
exchanges: [{"eid":"Huobi","currency":"BTC_USDT"}]
*)
//
MA10:=MA(C,10);
MA30:=MA(C,30);
Buy Opening Price:=VALUEWHEN(BARSBK=1,O);
Sell Opening Price:=VALUEWHEN(BARSSK=1,O);
//Conditions for opening a position
BUYCONDITION:=REF(C,1) < MMD OR CROSSUP(MA10,MA30);
SELLCONDITION:=REF(C,1) > HGH OR CROSSDOWN(MA10,MA30);
BKVOL=0 AND BUYCONDITION,BK;
SKVOL=0 AND SELLCONDITION,SK;
//Exit conditions
BKVOL>0 AND SELLCONDITION,SP;
SKVOL>0 AND BUYCONDITION,BP;
// Start stop loss
SKVOL>0 AND HIGH>=Sell Opening Price*(1+STOPLOSS*0.01),BP;
BKVOL>0 AND LOW<=Buy Opening Price*(1-STOPLOSS*0.01),SP;
AUTOFILTER;Published by cyberking on the FMZ strategy square · last modified 2020-03-02. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.
Build this with AgenKit
A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/Calibration-Value-or-Moving-Average-Crossover-Strategy.md- npx agenkit install engineering-kit in your project
- Paste the command into your agent and approve each phase
- Get tests, backtest, risk controls and a paper-trading switch
Understand it first
Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.
Related specs
- MACDMA Indicator Combination StrategyMyLanguage · Trend following
- 200 EMA VWAP MFI Trend Following StrategyPine Script · Trend following · 1d
- 4 EMA Trend StrategyPine Script · Trend following · 1d
- ADX MA and EMA Long Only Trend Tracking StrategyPine Script · Trend following · 1d
- ATR Dynamic Profit Target and Stop Loss StrategyPine Script · Trend following · 1d
- ATR Dynamic Trend Following and EMA Crossover Trading StrategyPine Script · Trend following · 1d