FXOrder2Go - Gross P/L API call ?

Moderator: Moderator

FXOrder2Go - Gross P/L API call ?

Postby parisblue2 » Fri Jun 24, 2011 6:00 am

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.
parisblue2
 
Posts: 6
Joined: Fri Jun 24, 2011 5:48 am

Re: FXOrder2Go - Gross P/L API call ?

Postby sunshine » Fri Jun 24, 2011 1:59 pm

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.
Attachments
TradeProfit_Signal.lua
(3.74 KiB) Downloaded 1185 times
sunshine
 

Re: FXOrder2Go - Gross P/L API call ?

Postby parisblue2 » Fri Jun 24, 2011 2:49 pm

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.
parisblue2
 
Posts: 6
Joined: Fri Jun 24, 2011 5:48 am

Re: FXOrder2Go - Gross P/L API call ?

Postby sunshine » Fri Jun 24, 2011 9:48 pm

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)
sunshine
 

Re: FXOrder2Go - Gross P/L API call ?

Postby Nikolay.Gekht » Sat Jun 25, 2011 8:58 am

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.
Nikolay.Gekht
FXCodeBase: Base Builder
 
Posts: 1222
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: FXOrder2Go - Gross P/L API call ?

Postby charamisgeorge » Thu Sep 27, 2012 5:01 am

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$ ??
charamisgeorge
 
Posts: 3
Joined: Thu Sep 27, 2012 4:36 am


Return to Order2Go

Who is online

Users browsing this forum: No registered users and 1 guest