Type/to search
0
Follow
0
Followers
Tôi đã sử dụng Inventor Quant được nửa tháng. Tôi muốn chia sẻ một mã cho phép robot thu thập thông tin vận hành thủ công sau chiến lược can thiệp thủ công.
FAQ
Created 2016-04-25 11:28:36  Updated 2019-08-01 10:33:10
 1
 2081

Sau khi thanh toán bằng tay, robot có thể nắm bắt các hoạt động thanh toán bằng tay và sau đó tính toán các trạng thái chiến lược chuyển đổi lợi nhuận, v.v.

if (GetPosition(PD_SHORT)[0]===0 && GetPosition(PD_LONG)[0]===0){ if (State!=STATE_IDLE){ var account = exchange.GetAccount(); if (account.Stocks > LastAccount.Stocks) { Counter.w++; } else { Counter.l++; } LogProfit(_N(account.Stocks - InitAccount.Stocks), "收益率:", _N((account.Stocks - InitAccount.Stocks) * 100 / InitAccount.Stocks) + '%'); LastAccount = account; } State=STATE_IDLE; }

Cứ nghĩ đi.

Related Recommendations
Comment
All comments (1)

    感放分享,替你排版了下.

    10 years ago
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)