Page 1 of 1

Closed Trades table

PostPosted: Wed Jan 17, 2018 6:48 pm
by Magoth
Hello,

I've developped a strategy that uploads Closed Trades datas to a web service.

The problem is that I can get all the closed trades datas I want but the rates.

For example,

Code: Select all
...
enum = core.host:findTable("closed trades"):enumerator();
    row = enum:next();
    while row ~= nil do
        local tradeID = row.TradeID;
        local tradeInstrument = row.Instrument;
        local type = row.BS;
        local openDate = dateToString(row.OpenTime);
        local closedDate = dateToString(row.CloseTime);
        local openRate = row.OpenRate;
        local closedRate = row.CloseRate;

...


row.OpenRate and row.CloseRate returns a nil value.

Anything I'm missing ?

Re: Closed Trades table

PostPosted: Wed May 08, 2019 8:03 am
by Gilles
Normal

it is row.open and row.closed

Re: Closed Trades table

PostPosted: Wed May 08, 2019 8:03 am
by Gilles
excuse me it is row.close or not closed

Re: Closed Trades table

PostPosted: Mon May 13, 2019 4:58 am
by Apprentice
http://www.fxcodebase.com/bin/products/ ... rades.html
Open Double The price the position was opened at.
Close Double The price the position was closed at.