1有A1,A2,A3,A4,A5五条线他们的大小值知道,但由大到小的顺序也知, 2.当股指C上穿某线时此线加2个最小单位限价买入,此线减2个最小单位同时做为止埙线 3.当股指C上穿到更高的线后,把更高的线做为止埙线 4.当到最高线已后,只要他不回按收盘前2分钟平仓 5.当下跌时跟上述反做 我想了好几天做不出清帮忙 |
你表述的太笼统了,但是大体思路是分段进行操作
//A1<C<A2时
IF CROSS(C,A1) AND C<A2 THEN BEGIN
BUY(1,1,LMT,A1+2*MINDIFF);
SELL(C<=A1-A*MINDIFF,1,LMT,A1-2*MINDIFF);
END
/A2<C<A3时
IF CROSS(C,A1) AND C>A2 AND C<A3 THEN BEGIN
....
END
依次类推