Indicore SDK

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

Moderator: admin

Indicore SDK

Postby c.glass » Wed Nov 13, 2013 11:23 am

I have developed a simple strategy. It works correctly in the LUA Strategy Debugger. When I load it into MarketScope and try to use "find" on the "summary" table it returns nil. However, when I use the enumerator it shows a row with an "OfferID" that equals my variable "Offer".

Any suggestions?

Code: Select all
        local summary = core.host:findTable("summary");
        local Position = summary:find("OfferID", Offer);
        if (Position == nil) then
            local enum, row;
            enum = core.host:findTable("trades"):enumerator();
            row = enum:next();
            while row ~= nil do
                terminal:alertMessage(instance.bid:instrument(), 1, "MY OfferID 1 = " .. row.OfferID, source:date(period - 1));
                terminal:alertMessage(instance.bid:instrument(), 1, "MY OfferID 2 = " .. Offer, source:date(period - 1));
                row = enum:next();
            end
        else
            terminal:alertMessage(instance.bid:instrument(), 1, "FOUND IT!!! " .. Offer, source:date(period - 1));
        end   
c.glass
 
Posts: 2
Joined: Wed Nov 13, 2013 10:57 am

Re: Indicore SDK

Postby Valeria » Thu Nov 14, 2013 12:15 am

Hi c.glass,

This snip of the code is ok. The issue should be somewhere else. Could you please send me the code of the strategy at the following e-mail: support(at)gehtsoftusa.com (please enter @ instead of (at))
Valeria
 


Return to Discussions

Who is online

Users browsing this forum: No registered users and 6 guests