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

Re: Closed Trades table

Postby Gilles » Wed May 08, 2019 8:03 am

Normal

it is row.open and row.closed
Gilles
FXCodeBase: Initiate
 
Posts: 158
Joined: Tue Jul 31, 2018 8:28 am
Location: France

Re: Closed Trades table

Postby Gilles » Wed May 08, 2019 8:03 am

excuse me it is row.close or not closed
Gilles
FXCodeBase: Initiate
 
Posts: 158
Joined: Tue Jul 31, 2018 8:28 am
Location: France

Re: Closed Trades table

Postby Apprentice » Mon May 13, 2019 4:58 am

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.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Discussions

Who is online

Users browsing this forum: No registered users and 7 guests