COCO研究院

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

程式無法執行移動停利

[複製鏈接]
發表於 17-1-16 21:07 | 顯示全部樓層 |閱讀模式
var
Profit2(180), Profit3(250),
Ratio1(0.618)
if maxprofit <> 0 then MaxProfit = maxpositionprofit/bigpointvalue/currentcontracts;
if marketposition > 0 then
begin
  Sell all shares next bar at entryprice - MinMove*Loss stop;=====>下單機會預掛,但不送單  
  Sell next bar at entryprice + MinMove*FixProfit limit;======>下單機會預掛,但不送單  

if MaxProfit > Profit2 and Maxprofit <= Profit3 Then
     Sell   all shares next bar at entryprice + MaxProfit*Ratio1 stop;======>今天條件滿足這個,但程式沒反應
end;

發表於 17-1-17 11:36 | 顯示全部樓層
if maxprofit <> 0
改為 if currentcontracts <> 0
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

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

GMT+8, 24-4-23 21:33

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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