COCO研究院

 找回密碼
 註冊
搜索
查看: 1969|回復: 2

[教學] 小白來請教

[複製鏈接]
發表於 20-7-16 21:03 | 顯示全部樓層 |閱讀模式
if RSI(14)<20 then sellshort("S") next bar at market;
if RSI(14)>80 then buy("B") next bar at market;
end;

if marketposition=1 then begin
        sell next bar entryprice -0.3 stop;
        sell next bar entryprice +0.6 limit;
end;

if marketposition=-1 then begin
        buytocover next bar entryprice +0.3 stop;
        buytocover next bar entryprice -0.6 limit;
end;

這樣寫的話,問題出在哪裡?

發表於 20-7-17 19:04 | 顯示全部樓層
本帖最後由 SALLY 於 20-7-17 19:12 編輯

你都沒說你遇上甚麼問題,要人家怎麼幫你? 如果是編譯問題,拿掉紅色的end;這是摩台當沖?

if RSI(14)<20 then sellshort("S") next bar at market;
if RSI(14)>80 then buy("B") next bar at market;
end;

if marketposition=1 then begin
        sell next bar entryprice -0.3 stop;
        sell next bar entryprice +0.6 limit;
end;

if marketposition=-1 then begin
        buytocover next bar entryprice +0.3 stop;
        buytocover next bar entryprice -0.6 limit;
end;


 樓主| 發表於 20-7-17 20:21 | 顯示全部樓層
SALLY 發表於 20-7-17 19:04
你都沒說你遇上甚麼問題,要人家怎麼幫你? 如果是編譯問題,拿掉紅色的end;這是摩台當沖?

if RSI(14)80 th ...

已經解決了,好像是RSI沒定義好和那個end的兩個問題
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

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

GMT+8, 24-4-26 07:29

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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