
請問各位高手,有沒有語法能只print 策略雷達中 觸發商品的欄位就好
- 145
- 最後發表 Robert168 2022 十月 14
musashi
發文於
2022/10/11
沒有語法,但有方法!把print放到觸發條件裡即可!有觸發才會執行print。以下範例~
if close>100
then begin
print(close);
ret=1;
end;
Robert168
發文於
2022/10/11
超感謝的 musashi ,我來試試。
Robert168
發文於
2022/10/13
小幫手您好 謝你的指點
condition6=false;
if value9=4 then condition6=true;//回傳值為4表示策略雷達回測(進場)
condition7=false;
if value9=41 then condition7=true;//回傳值為41表示策略雷達回測(出場)
if condition6=true then
print(file("C:\Users\盤中多方監控.log");
if condition7=true then
print(file("C:\Users\盤中空方監控.log");
這樣會只印 雷達的訊號嗎?
XQ小幫手
發文於
2022/10/14
Hello Robert168,
小幫手會這樣寫,有一樣的效果:
condition6 = value9 = 4;
condiiton7 = value9 = 41;
if condition6 print(file("C:\Users\盤中多方監控.log", date, time, "condition6 符合");
if condition7 print(file("C:\Users\盤中空方監控.log", date, time, "condition7 符合");
須注意print內要包含印出的資訊,且雷達警示的話要在符合條件時 ret = 1,像是:
if conditon6 then begin
ret = 1;
print(file("C:\Users\盤中多方監控.log", date, time, "condition6 符合")
end;
5 評論