Automatically update the trades list information

All posts which do not fit into any other sections of the forum.

Moderator: admin

Automatically update the trades list information

Postby guangho » Sat Mar 17, 2018 7:51 pm

Hello everyone!

My trades list sometimes does not automatically update,the strategy that does not get the latest trades information at run time.

1. Can the strategy be forced to automatically update the trades list information?
2, How should I write the strategy?

Thank you!
guangho
 
Posts: 85
Joined: Sat Sep 29, 2012 12:16 pm

Re: Automatically update the trades list information

Postby guangho » Tue Mar 20, 2018 11:22 am

Which Lady and gentleman can answer it, please?
guangho
 
Posts: 85
Joined: Sat Sep 29, 2012 12:16 pm


Re: Automatically update the trades list information

Postby guangho » Fri Mar 23, 2018 4:12 pm

Apprentice wrote:Forwarded to the development team.


Thanks for your help me.
guangho
 
Posts: 85
Joined: Sat Sep 29, 2012 12:16 pm

Re: Automatically update the trades list information

Postby PetroIV » Mon Apr 02, 2018 3:23 am

Hello guangho,

You can try to use function tradingtable_row:refresh.

http://www.fxcodebase.com/bin/products/IndicoreSDK/3.4.0/help/Lua/web-content.html#tradingtable_row.html

Example using:
Code: Select all
function RefreshTradesTableRows()

   local enum, row;
   local found = false;
   enum = core.host:findTable("trades"):enumerator();
   row = enum:next();
   while row ~= nil do
       row:refresh();
       row = enum:next();
   end
end
PetroIV
 
Posts: 23
Joined: Tue Aug 15, 2017 9:45 am

Re: Automatically update the trades list information

Postby guangho » Wed Apr 04, 2018 12:43 pm

Apprentice wrote:Forwarded to the development team.


I don't know why, sometimes my strategy doesn't update the trend map.
Can you tell me how to write strategy to make it automatically update before executing commands?
guangho
 
Posts: 85
Joined: Sat Sep 29, 2012 12:16 pm

Re: Automatically update the trades list information

Postby guangho » Wed Apr 04, 2018 12:57 pm

PetroIV wrote:Hello guangho,

You can try to use function tradingtable_row:refresh.

http://www.fxcodebase.com/bin/products/IndicoreSDK/3.4.0/help/Lua/web-content.html#tradingtable_row.html

Example using:
Code: Select all
function RefreshTradesTableRows()

   local enum, row;
   local found = false;
   enum = core.host:findTable("trades"):enumerator();
   row = enum:next();
   while row ~= nil do
       row:refresh();
       row = enum:next();
   end
end


I wrote similar sentences, but sometimes didn't update them.
It is mainly the TradesTable list of transaction software, and it is not the latest.
It needs to be updated manually.
Can your statements be forced to update?

function HT1(bsk)
local enum=core.host:findTable("trades"):enumerator();
local row=enum:next();
local bb1=0;
local dd1=0;
while row~=nil do
if row.AccountID==Account and row.OfferID==offer then
if row.BS==bsk then bb1=bb1+1 else dd1=dd1+1 end
end
row=enum:next();
end
return bb1,dd1 end
guangho
 
Posts: 85
Joined: Sat Sep 29, 2012 12:16 pm

Re: Automatically update the trades list information

Postby PetroIV » Wed Aug 29, 2018 5:49 am

guangho wrote:
I wrote similar sentences, but sometimes didn't update them.
It is mainly the TradesTable list of transaction software, and it is not the latest.
It needs to be updated manually.
Can your statements be forced to update?

function HT1(bsk)
local enum=core.host:findTable("trades"):enumerator();
local row=enum:next();
local bb1=0;
local dd1=0;
while row~=nil do
if row.AccountID==Account and row.OfferID==offer then
if row.BS==bsk then bb1=bb1+1 else dd1=dd1+1 end
end
row=enum:next();
end
return bb1,dd1 end


Hello guangho,

At the moment tables haven't force update method. The tables are updated automatically. I wrote a strategy for displaying the number of orders and trades in the logs. When creating / deleting order or trade manually using FXTS the strategy trades_orders_count.lua writes changes to the logs instantly.
Attachments
trades_orders_count.lua
(1.56 KiB) Downloaded 75 times
PetroIV
 
Posts: 23
Joined: Tue Aug 15, 2017 9:45 am


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 3 guests