রিসোর্স লোড হচ্ছে... লোডিং...

থার্মোস্ট্যাট কৌশল MyLanguage দ্বারা ক্রিপ্টো বাজারে ব্যবহার

লেখক:ভাল, তৈরিঃ 2020-08-21 19:19:20, আপডেটঃ 2023-10-10 21:15:32

Thermostat Strategy using on crypto market by MyLanguage

কৌশল নামঃ উন্নত থার্মোস্ট্যাট কৌশল

তথ্য চক্রঃ ১ ঘন্টা

সমর্থনঃ কমোডিটি ফিউচার, ডিজিটাল মুদ্রা ফিউচার, ডিজিটাল মুদ্রা স্পট

Thermostat Strategy using on crypto market by MyLanguage Thermostat Strategy using on crypto market by MyLanguage Thermostat Strategy using on crypto market by MyLanguage Thermostat Strategy using on crypto market by MyLanguage

  • প্রধান চার্ট: উপরের ট্র্যাক, ফর্মুলাঃ TOP^^MAC+N_TMPTMP; / / বোলের উপরের ট্র্যাক নীচের ট্র্যাক, সূত্রঃ BOTTOM^^MAC-N_TMPTMP;//বোলের নীচের ট্র্যাক

  • সেকেন্ডারি চার্ট: CMI, সূত্রঃ CMI: ABS ((C-REF ((C,N_CMI-1))/(HHV ((H,N_CMI) -LLV ((L,N_CMI)) * 100; //0-100 মান যত বড়, প্রবণতা তত শক্তিশালী, সিএমআই <20 হল দোল, সিএমআই>20 হল প্রবণতা

Thermostat Strategy using on crypto market by MyLanguage

সোর্স কোডঃ

(*backtest
start: 2018-11-06 00:00:00
end: 2018-12-04 00:00:00
period: 1h
exchanges: [{"eid":"Futures_CTP","currency":"FUTURES"}]
*)
 
MAC:=MA(CLOSE,N);
TMP:=STD(CLOSE,N);
TOP^^MAC+N_TMP*TMP;// upper track of boll
BOTTOM^^MAC-N_TMP*TMP;// lower track of boll
BBOLL:=C>MAC;
SBOLL:=C<MAC;
N_CMI:=30;
 
CMI:ABS(C-REF(C,N_CMI-1))/(HHV(H,N_CMI)-LLV(L,N_CMI))*100;
//0-100 the larger the value, the stronger the trend, CMI <20 is oscillation mode, CMI>20 is the trend
 
N_KD:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N_KD))/(HHV(HIGH,N_KD)-LLV(LOW,N_KD))*100;
//(1)closing price - the lowest of cycle N, (2)the highest of cycle N - the lowest of cycle N, (1)/(2)
K:=SMA(RSV,M1,1);//MA of RSV
D:=SMA(K,M2,1);//MA of K
MIND:=30;
BKD:=K>D AND D<MIND;
SKD:=K<D AND D>100-MIND;
 
//oscillation mode
BUYPK1:=CMI < 20 AND BKD;//if it's oscillation, buy to cover and buy long immediately
SELLPK1:=CMI < 20 AND SKD;//if it's oscillation, sell to close long position and sell short to open position immediately
 
//Disposal of the original oscillating position under the trend mode
SELLY1:=REF(CMI,BARSBK) < 20 AND C>BKPRICE*(1+0.01*STOPLOSS*3) AND K<D;//if it's oscillation, long position take profit
BUYY1:=REF(CMI,BARSSK) < 20 AND C<SKPRICE*(1-0.01*STOPLOSS*3) AND K>D;//if it's oscillation, short position take profit
 
//trend mode
BUYPK2:=CMI >= 20 AND C > TOP;//if it's trend, buy to cover and buy long immediately
SELLPK2:=CMI >= 20 AND C < BOTTOM;//if it's trend, sell to close long position and sell short to open position immediately
 
//Disposal of the original oscillating position under the trend mode
SELLY2:=REF(CMI,BARSBK) >= 20 AND C>BKPRICE*(1+0.01*STOPLOSS*3) AND SBOLL;//if it's trend, long position take profit
BUYY2:=REF(CMI,BARSSK) >= 20 AND C<SKPRICE*(1-0.01*STOPLOSS*3) AND BBOLL;//if it's trend, short position take profit
 
SELLS2:=REF(CMI,BARSBK) >= 20 AND C<BKPRICE*(1-0.01*STOPLOSS) AND SBOLL;//if it's trend, long position stop loss
BUYS2:=REF(CMI,BARSSK) >= 20 AND C>SKPRICE*(1+0.01*STOPLOSS) AND BBOLL;//if it's trend, short position stop loss
 
IF BARPOS>N THEN BEGIN
    BUYPK1,BPK;
    SELLPK1,SPK;
    BUYPK2,BPK;
    SELLPK2,SPK;
END
BUYY1,BP(SKVOL);
BUYY2,BP(SKVOL);
BUYS2,BP(SKVOL);
SELLY1,SP(BKVOL);
SELLY2,SP(BKVOL);
SELLS2,SP(BKVOL);

সোর্স কোডঃhttps://www.fmz.com/strategy/129086


সম্পর্কিত বিষয়বস্তু

আরও দেখুন