Break High and Low Volume Index Weighting Strategy
- Data cycle: multiple cycles - Backtest can choose OKEX futures - Contract: this week contract - Main chart: none - Secondary chart: VJQ, calculation formula: VJQ: EMA (V (C-REF (C, NC)), N)
Data cycle: multiple cycles
Backtest can choose OKEX futures
Contract: this_week contract

Main chart: none
Secondary chart: VJQ, calculation formula: VJQ: EMA (V* (C-REF (C, NC)), N)
Parameters
| Name | Default | What it controls |
|---|---|---|
| SLOSS | 2 | Stop Loss Percentage | percentage of stop loss |
| N | 300 | EMAMetric parameters | EMA index parameter |
| NC | 50 | Closing price from how many periods ago | closing price of how many cycles ago |
| MINAMOUNT | true | Minimum order quantity per time | minimum order quantity at a time |
Source MyLanguage
(*backtest
start: 2018-04-01 00:00:00
end: 2018-05-28 00:00:00
period: 1h
exchanges: [{"eid":"Futures_OKCoin","currency":"BTC_USD"}]
args: [["N",100],["MINAMOUNT",10],["TradeAmount",10,126961],["ContractType","this_week",126961]]
*)
LOTS:=MAX(MINAMOUNT,INTPART(MONEYTOT/O * 0.8));
VJQ:EMA(V*(C-REF(C,NC)),N);
B:=VJQ>0;
S:=VJQ<0;
BUYPK:=BARPOS>N AND BKVOL=0 AND B AND H>=HHV(H,N);
SELLPK:=BARPOS>N AND SKVOL=0 AND S AND L<=LLV(L,N);
BUYP:=SKVOL>0 AND B;
SELLP:=BKVOL>0 AND S;
// Admission
// Enter
SELLPK,SPK(LOTS);
BUYPK,BPK(LOTS);
// Exit position
// Leave
BUYP,BP(SKVOL);
SELLP,SP(BKVOL);
// stop loss
// Stop loss
C>=SKPRICE*(1+SLOSS*0.01),BP(SKVOL);
C<=BKPRICE*(1-SLOSS*0.01),SP(BKVOL);
AUTOFILTER;Published by 阿基米德的浴缸 on the FMZ strategy square · last modified 2018-12-15. 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/Break-High-and-Low-Volume-Index-Weighting-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
- KRT Keltner ChannelMyLanguage · Other
- Combination of Double MA and RSIMyLanguage · Other
- DMI and High Low StrategyMyLanguage · Other
- Trading Strategy of Traditional MA Index and KD IndexMyLanguage · Other
- Typical Price Percentage Channel Keltner and Percentage Channel VariationsMyLanguage · Other
- Angle Attack Follow Line IndicatorPine Script · Other · 15m