Handelsstrategie des traditionellen MA-Index und des KD-Index

Schriftsteller:Das Bad von Archimedes, Datum: 2018-11-30 18:32:26
Tags:- Nein.MyLanguageKDJ

  • Datenzyklus: 15M, 30M usw.

  • Unterstützung: Rohstofffutures

  • Die Indikatoren sind EMA, KD-Linien und KD-Linien mit Standardparametern (indexorientierte Parameter 3, 3, 9).

    img
    img

  • Hauptdiagramm: EMA-Mittel, Formel: MAC ^^ EMA (C, N);

  • Sekundärdiagramm: Linie K in KD, Formel: K: SMA (RSV, M1, 1); //RSV gleitender Durchschnitt D Linie in KD, Formel: D: SMA (K, M2, 1); //K gleitender Durchschnittswert


(*backtest
start: 2018-04-01 00:00:00
end: 2018-05-15 00:00:00
period: 30m
exchanges: [{"eid":"Futures_BitMEX","currency":"XBT_USD"}]
args: [["TradeAmount",100,126961],["ContractType","XBTUSD",126961]]
*)

MAC^^EMA(C,N);

NKD:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,NKD))/(HHV(HIGH,NKD)-LLV(LOW,NKD))*100;  //收盘价与NKD周期最低值做差,NKD周期最高值与NKD周期最低值做差,两差之间做比值。
// (1)closing price minus the lowest value in NKD cycle, 
// (2)the highest value in NKD cycle minus the lowest value in NKD cycle, then (1) divided by (2).

K:SMA(RSV,M1,1);     // RSV的移动平均值
                     // MA of RSV
                     
D:SMA(K,M2,1);       // K的移动平均值
                     // MA of K

BARPOS>N AND C>MAC AND K<D,BK;
BARPOS>N AND C<MAC AND K>D,SK;
C<=BKPRICE*(1-SLOSS*0.01),SP(BKVOL);
C>=SKPRICE*(1+SLOSS*0.01),BP(SKVOL);
C>=BKPRICE*(1+SLOSS*0.01) AND C<MAC,SP(BKVOL);
C<=SKPRICE*(1-SLOSS*0.01) AND C>MAC,BP(SKVOL);

Verwandt

Mehr