Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 12:19:07 +0000



GetTradePosition

View Count: 1201

[2014-02-12 07:58:46]
Kiwi - Posts: 375
I think I'm making a mistake in my use of this:


s_SCPositionData pd;
if(sc.GetTradePosition(pd) == 1 && pd.PositionQuantity != 0)
inTrade = 1;

SC 1086, Interactive Brokers HSI-201402-HKFE

Under chart settings the symbol is set to HSI-201402-HKFE lthough there is no Trade and Current Quote Symbol.

It works fine in replay (sim) mode but in live trading it returns zero so it never recognizes that its in a trade. I use manual looping only. Can you please advise what I should do differently?
Date Time Of Last Edit: 2014-02-12 08:01:40
[2014-02-12 08:46:15]
Sierra Chart Engineering - Posts: 104368
For safety, this should be written as:
sc.GetTradePosition(pd) >0

Do you see a nonzero position for HSI-201402-HKFE in Trade >> Trade Orders and Positions >> Positions, during live trading for that symbol?

You also need to make sure that sc.SendOrdersToTradeService is set to 1.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2014-02-12 08:46:31

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account