COCO研究院

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

cross under(over)語法替代

[複製鏈接]
發表於 12-4-30 19:11 | 顯示全部樓層 |閱讀模式
看完 無無明大在Tradestation是否走完整條Bar, 才會生成買賣條件及下單功能?這篇文章中的提醒,小弟試著照無無明大給的hint去try,可惜還是出現了重複出現出場訊號的問題

小弟方法如下:
if close[1]>=ma20[1] and time=1345  then currentdirection=1;
if close<ma20 and time=1345 then currentdirection=2;
if currentdirection<>lastdirection then begin
   lastdirection=currentdirection;
   Crossed=lastdirection;
end
else
begin
   Crossed=0;
end;

if Crossed=2 then
        exitlong 2 contracts next bar at market;

就小弟的認知中,會出現重複訊號是因為當根bar的close值一直變動(是這樣嘛?),因此我試著去固定時間,可惜還是失敗了XD

請教各位高手,小弟的盲點出在哪邊?? 感謝

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

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

GMT+8, 24-5-3 05:34

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回復 返回頂部 返回列表
理財討論網站 | AI繪圖AI超擬真美女AI beauty AI Stable DiffusionAI正妹AI Lookbook