另,发现在程序加载中,有一些难以理解的情况出现。如:在加载某一句未包含时间的程序后,出现在某时间段如14:00之后,在图表上就不再有交易信号,而去掉该句程序后,14:00之后就有交易信号等情况。
再,使用账户函数如:亏损次数、盈亏情况等,是否在打开账户后才有效,若未打开账户,是否可在程序中使用上类函数。谢谢!!!
估计是楼主系统问题.
本人,简单均线交易(橡胶1105,1分钟,运行情况良好)---图表程序化交易(图表程序化交易中,勾选BUY,SELL等新交易系统信号,走完一根K线)
提供给楼主,供楼主测试
ma5:ma(close,5);
ma15:ma(close,15);
//开多平空
if CROSS(ma5,ma15) and currenttime>090100 and currenttime<145000 then
begin
sellshort(holding<0,0,thisclose);
buy(holding=0,1,thisclose);
end
//开空平多
if CROSS(ma15,ma5) and currenttime>090100 and currenttime<145000 then
begin
sell(holding>0,0,thisclose);
buyshort(holding=0,1,thisclose);
end
//收盘前5分钟平仓
if currenttime > 145500 then
begin
sell(holding > 0, 0, thisclose);
sellshort(holding < 0, 0, thisclose);
end
谢谢侠客!!!用你提供的程序加载,能够进行交易,可我的程序为何不能哪???
请指教!!!