作者ifoo (天空之城)
看板Option
标题[问题]请问HTS输出下单讯号
时间Thu Jul 9 11:44:41 2009
我用五分K测试输出下单讯号
K线收盘价大於3均线买进,反之卖出
为何我的下单讯号会一直重复输出呢
而且买卖也不对
我找好久,程式看起来没问题啊
有没有高手可以帮我看一下
谢谢!!
Param : MA(3)
condition1=close cross over average(close,MA)
condition2=close cross below average(close,MA)
if condition1 then buy("buy") next bar at market
if date = lastcalcdate and time = LastCalcTime then
FileAppend("C:\order.txt", NumToStr(Q_Time,0) + "XXXX1XXXX" + "|r|n")
end if
end if
if condition2 then sell("sell") next bar at market
if date = lastcalcdate and time = LastCalcTime then
FileAppend("C:\order.txt", NumToStr(Q_Time,0) + "XXXX-1XXXX" + "|r|n")
end if
end if
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.164.73.156
※ 编辑: ifoo 来自: 218.164.73.156 (07/09 11:53)
1F:推 bhafnndpcst:当下的k线close价会一直变 07/09 13:21
2F:→ ifoo:但我加if date = lastcalcdate and time = LastCalcTime then 07/09 16:37
3F:→ ifoo:却发挥不了作用?? 07/09 16:38
4F:→ krazymilk:看这些比看大盘还难懂 囧 07/09 17:26
5F:→ idleidle:最基本的程式交易,楼上加油! 07/09 18:05
※ 编辑: ifoo 来自: 218.164.73.156 (07/09 18:37)
6F:→ ifoo:有办法把close改成bar结束的close吗,让穿越只会出现一次 07/09 18:55