請選擇 進入手機版 | 繼續訪問電腦版

COCO研究院

 找回密碼
 註冊
搜索
查看: 1919|回復: 1

請教大神

[複製鏈接]
發表於 22-9-15 11:07 | 顯示全部樓層 |閱讀模式
inputs: RSI_Length(14);
variables: var_RSI(0);



var_RSI = RSI( close, RSI_Length ) ;

if var_RSI > 70 then SellShort next bar at market;
if var_RSI<25  then buy next bar at market;

//exit
Inputs: Maxloss(60),profit(30);

if marketposition = 1 then begin
   sell all shares next bar at entryprice - Maxloss stop;
   sell all shares next bar at entryprice + profit limit;

end;

if marketposition = -1 then begin
   buytocover all shares next bar at entryprice + Maxloss stop;
   buytocover all shares next bar at entryprice - profit limit;

end;

請問高手  為啥我這樣RSI有訊號時 入了一口 但是當他又有訊號 又重複入一口 設定那邊 也改了 只能下一口 請問有辦法改善嗎?


發表於 22-9-28 17:17 | 顯示全部樓層
進場 你沒做限制呀
加一個marketposition = 0
當沒有部位時才進場

if marketposition = 0 and var_RSI > 70 then SellShort next bar at market;
if marketposition = 0 and var_RSI<25  then buy next bar at market;


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

本版積分規則

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

GMT+8, 24-3-29 16:15

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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