- 精华
- 0
- 在线时间
- 17 小时
- UID
- 182062
- 积分
- 5
- 帖子
- 4
- 阅读权限
- 10
- 注册时间
- 2014-3-10
- 最后登录
- 2014-9-22
- 精华
- 0
- UID
- 182062
- 积分
- 5
- 帖子
- 4
- 主题
- 1
- 阅读权限
- 10
- 注册时间
- 2014-3-10
- 最后登录
- 2014-9-22
|
runmode:0;
input:n1(4,1,100,1);
input:n2(9,1,100,1);
input:n3(18,1,100,1);
input:n4(100000,1,1000000,1);
ma1:=ma(close,n1);
ma2:=ma(close,n2);
ma3:=ma(close,n3);
if holding=0 then begin
if close>ma1 and ma1>ma2 and ma2>ma3 then
buy(1,1,limitr,close);
end
if holding=0 then begin
if close<ma1 and ma1<ma2 and ma2<ma3 then
buyshort(1,1,limitr,close);
end
if holding>0 then begin
if ma1<ma2 then
sell(1,holding,limitr,close);
end
if holding<0 then begin
if ma1>ma2 then
sellshort(1,holding,limitr,close);
end
请教:1、如何改成TB系统?
2、每次开仓为帐户资金的30%如何加入?
3、进出场信号为K线的收盘价时的对手价以保证成交?或者以出现交易信号的K线要结束的最后3分钟以保证成交?该如何加入?
新手不懂,请老师们赐教,以便学习!谢谢! |
|