0bps

Strategy vault / Grid

Mai Language Grid Strategy

MyLanguage strategy by a8269917.

MyLanguageGrid
Author
a8269917
Complexity
Starter · 9 lines
Parameters
6

The original spec has no written description. Read the source below.

Parameters

NameDefaultWhat it controls
ktkc10Short Initial Position
dtkcfalseLong Initial Position
y0.02Profit reduction distance
s0.02Loss-added distance
jiatrueLoss amount of position added
jiantrueProfit reduction quantity

Source MyLanguage

VARIABLE:V1:1;
IF dtkc>0 AND BKVOL=0 THEN BEGIN 1,BK(dtkc);V1:C;INFO(1,V1);END
IF ktkc>0 AND SKVOL=0 THEN BEGIN 1,SK(ktkc);V1:C;INFO(1,V1);END
IF BKVOL>0 AND C>V1/(1-y) THEN BEGIN 1,SP(jian);V1:C;INFO(1,V1);END
IF BKVOL>0 AND C<V1*(1-s) THEN BEGIN 1,BK(jia);V1:C;INFO(1,V1);END
IF SKVOL>0 AND C<V1/(1+y) THEN BEGIN 1,BP(jian);V1:C;INFO(1,V1);END
IF SKVOL>0 AND C>V1*(1+s) THEN BEGIN 1,SK(jia);V1:C;INFO(1,V1);END
MULTSIG(0,0,60,0);
TRADE_AGAIN(1000);

Published by a8269917 on the FMZ strategy square · last modified 2019-06-21. 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.

in Claude Code, Cursor, Codex & 4 more
/agenkit build a grid bot with inventory caps and order deduplication from strategies/Mai-Language-Grid-Strategy.md
  1. npx agenkit install engineering-kit in your project
  2. Paste the command into your agent and approve each phase
  3. 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

esc

Try , , or .

↑↓ move↵ open