COCO研究院

 找回密碼
 註冊
搜索
查看: 3275|回復: 0

簡單暴力那斯達克策略分享+團購

[複製鏈接]
發表於 22-9-25 12:33 | 顯示全部樓層 |閱讀模式

套到台指都適用
input:len(8),len_S(9);
var:L_HL2(0),S_HL2(0);
L_HL2=(H+L+c)/3;
S_HL2=(H+L+c)/3;
condition90=marketposition<=0;
condition91=marketposition>=0;
input:x1(2.1);
var:HH(0),LL(0);
HH=highest(L_HL2,len)+x1*AvgTrueRange(len);
LL=lowest(S_HL2,len_s)-x1*AvgTrueRange(len_s);
//////////////////////////////////////////////
Input:L_rsi_len_1(26),L_rsi_vale_1(55);
var:L_rsi_val_1(0);
L_rsi_val_1=rsi(c,L_rsi_len_1);
condition20=L_rsi_val_1<L_rsi_vale_1;
/////////////////////////////////////////////////
input:avg1(3),avg3(1);
var:ma1(0),pz_s1(1);
ma1=average(close,avg3);
condition11=average(close,avg1) < ma1;
//////////////////////////////////////////////////
input:avg21(45),avg23(46);
var:ma21(0),pz_L1(1);
ma21=average(close,avg23);
condition21=average(close,avg21)<ma21;
//////////////////////////////////////////////////
if condition90 and condition11
        and entryname<>"SBH" and entryname<>"LBH" then begin
        buy("L") next bar HH stop;
end;
if condition91 and condition20 and condition21
        and entryname<>"SBH" and entryname<>"LBH" then begin
        sellshort("S") next bar LL stop;
end;
//////////////////////////////////////////////
input:win_L1(71),winp_L1(0.6);
input:win_L2(304),winp_L2(0.9);

if marketposition=1 and close-entryprice>=win_L1 and entryname<>"LBH" then
        sell("L_exit_C1")all contract next bar at entryprice+win_L1*winp_L1 stop;
if marketposition=1 and close-entryprice>=win_L2 and entryname<>"LBH" then
        sell("L_exit_C2")all contract next bar at entryprice+win_L2*winp_L2 stop;
//////////////////////////////////////////////
input:win_S1(136),winp_S1(0.85);
input:win_S2(475),winp_S2(0.9);

if marketposition=-1 and entryprice-c>=win_S1 and entryname<>"SBH" then
        buytocover("S_exit_C1")all contract next bar at entryprice-win_S1*winp_S1 stop;
if marketposition=-1 and entryprice-c>=win_S2 and entryname<>"SBH" then
        buytocover("S_exit_C2")all contract next bar at entryprice-win_S2*winp_S2 stop;
//////////////////////////////////////////////
input:G10(46),K10(24.5);
if entryname="S" then
        buy("LBH") next bar highest(high,G10)+K10 stop;
        
input:G40(46),K40(47.5),L_BH_SL(10);
if entryname="LBH" then begin
        sell("LBH_SL") from entry("LBH") next bar lowest(low,G40)-K40 stop;
        //sell("LBH_SL_fix") from entry("LBH") next bar entryprice-L_BH_SL stop;
end;

input:win_L(262.5),winP1_L(0.9);
input:win_L4(313),winP1_L4(0.95);

if entryname="LBH" and c-entryprice>=win_L then
        sell("LBH_PT") from entry("LBH") next bar entryprice+win_L*winp1_L stop;
if entryname="LBH" and c-entryprice>=win_L4 then
        sell("LBH_PT1") from entry("LBH") next bar entryprice+win_L4*winp1_L4 stop;
/////////////////////////////////////////////
input:G20(22),K20(23);
if entryname="L" and openpositionprofit<=0 then
        sellshort("SBH") next bar lowest(Low,G20)-K20 stop;
        
input:G3(18),K3(13),S_BH_SL(10);
if entryname="SBH" then begin
        buytocover("SBH_SL") from entry("SBH") next bar highest(high,G3)+K3 stop;
end;        

input:win_S(102),winP1_S(0.9);
input:win_S4(126),winP1_S4(0.95);

if entryname="SBH" and entryprice-c>=win_s then
        buytocover("SBH_PT") from entry("SBH") next bar entryprice-win_s*winp1_s stop;
if entryname="SBH" and entryprice-c>=win_s4 then
        buytocover("SBH_PT1") from entry("SBH") next bar entryprice-win_s4*winp1_s4 stop;
---------------------------------------------------------------------------------------------------------------------------
團購第二波海期策略約20支
包含那斯達克、小道瓊、ES、GC、CL
有興趣加我賴cyberkey








下載 (1).png
下載.png
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

手機版|Archiver|站長信箱|廣告洽詢|COCO研究院

GMT+8, 24-12-27 21:37

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回復 返回頂部 返回列表
理財討論網站 |