How to get Stop value for an open market trade

Moderator: Moderator

How to get Stop value for an open market trade

Postby Torbus2 » Thu May 21, 2015 9:12 am

I have open market trade with a stop limit set to it.

I cannot find a way to retrieve the current stop limit value, when I have O2GTradeRow.
Given that I am NOT using the TableManager, how can I get the stop rate or pip distance from the entry price? Something like O2GTradeRow.getStop(), but with readers.

Thank you!
Torbus2
 
Posts: 1
Joined: Thu May 21, 2015 9:00 am

Re: How to get Stop value for an open market trade

Postby Georgiy » Thu May 28, 2015 6:20 am

Hello Torbus2,

O2GTradeRow does not contain data about Stop\Limit. You need to find the stop\limit orders associated with this position.
In the table Orders find the orders with the value IO2GOrderRow.getTradeID that matches IO2GTradeRow.getTradeID and IO2GOrderRow.getType values have a necessary type ("S", "L" for stop and limit respectively).

Thank you.
Georgiy
FXCodeBase: Initiate
 
Posts: 150
Joined: Tue Jul 29, 2014 4:49 am


Return to ForexConnect API

Who is online

Users browsing this forum: No registered users and 10 guests