Page 1 of 1

FXOrder2Go - Gross P/L API call ?

PostPosted: Fri Jun 24, 2011 6:00 am
by parisblue2
Hi,
I am using FXOrder2Go because I cannot geta clean build out of ForexConnectAPI.
I know FXOrder2Go is old but don't mind, as I ony need it for some thing.

I've been asking the Trading Station guys for years if the had any plans to add an alert
to TradingStation so I can be notified when my Gross P/L (for Open Position, not Daily P/L)
reaches a certain limit. It doesn't seem like that is going to happen.

They recommended using the API so I installed FXOrder2Go compile and built the LoginAndTrade
example without problems. I can easily tailor that example to do what I want.

What I want to know is which API function call I can make to retrieve the Gross P/L value that
you see in the bottom of the Open Positions view in Trading Station?

Do you have an example of the function call to make?
That would be very helpfull to me. I looked ethrough the documentation but I couldn't
find any reference to it so I hope the call exists.

Thanks in advance.

Paris.

Re: FXOrder2Go - Gross P/L API call ?

PostPosted: Fri Jun 24, 2011 1:59 pm
by sunshine
Please check the attached signal. It gives an alert when position profit/loss reaches the specified level in pips. Let me know whether it is what you need.

Re: FXOrder2Go - Gross P/L API call ?

PostPosted: Fri Jun 24, 2011 2:49 pm
by parisblue2
It wasn't what I needed, but thanks for the suggestion.
what I needed an be done by interrogating the Tables and
retrieving the GrossPL field.

Re: FXOrder2Go - Gross P/L API call ?

PostPosted: Fri Jun 24, 2011 9:48 pm
by sunshine
You can get GrossPL for a trade through the GrossPL column in the Trades table.
Please see on-line documentation: Trades table
Below is an example in VBS:
Code: Select all
   'get the table
   Set table = tradeDesk.FindMainTable("trades")
   'get the table columns
   Set columns = table.Columns
   'find the row by trade ID
   Set row = table.FindRow("TradeID", "Ticket")
   'retrieve Gross PL
   row.CellValue("GrossPL")

However, to have an actual Gross P/L value, you should subscribe for updates of the table. You'll get an event each time when the table is changed. In this case you should process all events to determine whether the GrossP/L of your trade is changed.
Please read Event Processing

You can find the examples on how to process events in the Events folder located in the folder with examples for corresponding programming language (please check C:\Program Files\Candleworks\FXOrder2Go\Examples)

Re: FXOrder2Go - Gross P/L API call ?

PostPosted: Sat Jun 25, 2011 8:58 am
by Nikolay.Gekht
BTW, I didn't get why attached signal for marketscope is not the thing? It is much simpler to just run a signal inside the Trading Station than to create a new connection and run, literally, a copy of TS on the same computer.

Re: FXOrder2Go - Gross P/L API call ?

PostPosted: Thu Sep 27, 2012 5:01 am
by charamisgeorge
sunshine wrote:Please check the attached signal. It gives an alert when position profit/loss reaches the specified level in pips. Let me know whether it is what you need.


hello... is it possible to give an alert when gross p/l reaches a specified level in money??
let's say 500$ ??