Dukascopy
 
 
Wiki JStore Search Login

如何判斷 同一方向在倉單數
 Post subject: 如何判斷 同一方向在倉單數 Post rating: 0   New post Posted: Sat 29 Aug, 2015, 09:33 
User avatar

User rating: 0
Joined: Mon 17 Aug, 2015, 16:05
Posts: 1
Location: Taiwan,
你好 !
不好意思我剛接觸 VISAUALJF, 有個問題:不知道用哪個 block 去判斷BUY POSITION =0 或是 SELL POSITION =0 下才進行程式,
譬如: 程式在幫我下一張BUY POSITION 前須判斷Position 是否有BUY單, 若有則取消, 若無則下BUY單

謝謝~~


 
 Post subject: Re: 如何判斷 同一方向在倉單數 Post rating: 0   New post Posted: Thu 22 Oct, 2015, 09:30 
Visual JForex expert at Dukascopy
User avatar

User rating: 1
Joined: Thu 29 Aug, 2013, 13:07
Posts: 88
Location: Ukraine, Kiev
您好,

如果判断Buy Position或Sell Position,先要使用Positions Viewer仓位观测器,使用All Positions,然后命名My_Positions。然后用If block比较My_Positions.Position Amount仓位数量和1,如果My_Positions.Position Amount<1,说明没有仓位,这样就可以Open at Market Buy入市开仓买多。如果My_Positions.Position Amount>=1,说明有仓位,然后用If block比较My_Positions.Position is Long=false,也就是没有多头仓位,在这个情况下Open at Market Buy入市开仓买多。请看截图。
Image


Attachments:
Capture.JPG [122.11 KiB]
Downloaded 311 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 

Jump to:  

  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com