Closed Trades table

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

Closed Trades table

Postby Magoth » Wed Jan 17, 2018 6:48 pm

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 ?
Magoth
 
Posts: 6
Joined: Fri Sep 01, 2017 6:13 pm

Return to Discussions

Who is online

Users browsing this forum: No registered users and 3 guests