Hi,
I'd like to know if there is any specific method to list the available instruments from the broker. Any help would be appreciated.
Regards.
Moderator: Moderator
function Init()
indicator.parameters:addString("Instrument" .. id, "Instrument", "", Instrument);
indicator.parameters:setFlag("Instrument" .. id, core.FLAG_INSTRUMENTS);
end
function getInstrumentList()
local list={};
local point={};
local count = 0;
local row, enum;
enum = core.host:findTable("offers"):enumerator();
row = enum:next();
while row ~= nil do
count = count + 1;
list[count] = row.Instrument;
point[count] = row.PointSize;
row = enum:next();
end
return list, count,point;
end
Pair, Count,Point = getInstrumentList();
Users browsing this forum: No registered users and 13 guests