會測試這個是因為我昨晚、與今日早上本應停利的,總共2次,但雷達沒有觸發停利,然後k線開始反轉直到我虧損為止(心中非常地歐),我想是不是改版後又有問題了,測試了一下,好像真的有點問題呢,請小幫手協助看一下。
- 1分k棒
- 進場:單次觸發
- 出場:單次觸發
腳本:
variable: intrabarpersist _stockS(0),intrabarpersist _costS(0);
input:_BuyOrSell(1,"1進場,0出場");
//空單進場1
if _stockS = 0 and allow_time = True
and close > open
and getinfo("IsRealTime") = 1
then
begin
_stockS = 1 ;
_costS = close;
if _BuyOrSell=1 then ret=1;
retmsg ="空單進場1";
print(date,time,_stockS,_costS,"空單進場1");
end;
//空單停利
if _stockS =1
and _costS -c > 2
then begin
print(date,time,"空單停利");
_stockS = 0 ;
_costS = 0;
if _BuyOrSell=0then ret=1;
retmsg ="空單停利";
end;
//空單停損1
if _stockS =1
and _costS - c <= -2
then begin
print(date,time,"空單停損1", _costS - close);
_stockS = 0 ;
_costS =0;
if _BuyOrSell=0then ret=1;
retmsg ="空單停損1";
end;
//========================================================================
問題整理 :
一、重覆下新倉單
我的腳本中有用變數記錄庫存,但仍一直下新單。


二、停利停損沒有出場
如圖,print出來的記錄是有達到平倉要求的,但雷達就是沒有觸發。


以上的問題測試2小時,真的明顯的問題才對,求助!!!
※像改版後若真的是有問題造成原本應賺錢的虧損,貴司會給我們使用上的補償嗎?(例如減免月租)


2 評論