Sumber dimuat naik... memuat...

Gabungan Double MA dan RSI

Penulis:Mandi Archimedes, Tarikh: 2018-11-30 18:33:15
Tag:RSIMAMyLanguage

  • Nama Strategi: Gabungan MA Ganda dan RSI

  • Kitaran data: 15M, 30M, dan lain-lain

  • Sokongan: Masa Depan Komoditi

    img
    img

  • Carta utama: MA 1, formula: MA1 ^^ EMA (C, N1); MA 2, formula: MA2 ^^ EMA (C, N2);

  • Carta sekunder: RSI, formula: RSIVALUE:SMA(MAX(CLOSE-REF(CLOSE,1),0),LENGTH,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),LENGTH,1)*100;


(*backtest
start: 2018-11-05 00:00:00
end: 2018-12-05 00:00:00
period: 15m
exchanges: [{"eid":"Futures_OKCoin","currency":"BTC_USD"}]
args: [["ContractType","this_week",126961]]
*)

MA1^^EMA(C,N1);
MA2^^EMA(C,N2);

LENGTH:=9;
OVERBOUGHT:=70;
OVERSOLD:=100-OVERBOUGHT;
RSIVALUE:SMA(MAX(CLOSE-REF(CLOSE,1),0),LENGTH,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),LENGTH,1)*100;
BUYK:=BKVOL=0 AND BARPOS>N2 AND MA1>MA2 AND C>MAX(MA1,MA2) AND CROSSUP(RSIVALUE,OVERBOUGHT);
SELLK:=SKVOL=0 AND BARPOS>N2 AND MA1<MA2 AND C<MIN(MA1,MA2) AND CROSSDOWN(RSIVALUE,OVERSOLD);
SELLY:=MA1<MA2 AND C>BKPRICE*(1+SLOSS*0.01);
BUYY:=MA1>MA2 AND C<SKPRICE*(1-SLOSS*0.01);
SELLS:=C<BKPRICE*(1-SLOSS*0.01);
BUYS:=C>SKPRICE*(1+SLOSS*0.01);

BUYK,BK;
SELLK,SK;
SELLY,SP(BKVOL);
BUYY,BP(SKVOL);
SELLS,SP(BKVOL);
BUYS,BP(SKVOL);

Berkaitan

Lebih lanjut

Paris_RomanticBagaimana saya boleh memaksa dia membeli semua stok?

pemburu010Adakah anda mahu bergelak?