bar_stream looks strange in IndicoreSDK 2.1

Section for all discussions related to development using Indicore API/SDK.

Moderator: admin

bar_stream looks strange in IndicoreSDK 2.1

Postby before2012 » Wed Mar 14, 2012 7:44 am

Hello there,
When I tried to write a test indicator which use bar_stream as its data source, one thing looks very strange to me: each bar will trigger 8 times in the Indicator Debugger program.
my Update() function:
Code: Select all
function Update(period) 
    if period >= first and source:hasData(period) then
        print("OHLC(@serial" .. source:serial (period) .. "): "
            .. source.open[period] .. ","
            .. source.high[period] .. ","
            .. source.low[period] .. ","
            .. source.close[period])
end

when I ran it in debugger, one bar will be triggered 8 times.
E.g. for this bar: "DAT;24.02.2011 17:00:00;1.379670;1.383700;1.372250;1.374390;1.380390;1.383970;1.372500;1.374630;163984;163984", it produces:
OHLC(@serial3859): 1.37967,1.37967,1.37967,1.37967
OHLC(@serial3859): 1.37967,1.38168,1.37967,1.38168
OHLC(@serial3859): 1.37967,1.3837,1.37967,1.3837
OHLC(@serial3859): 1.37967,1.3837,1.37967,1.37988
OHLC(@serial3859): 1.37967,1.3837,1.37606,1.37606
OHLC(@serial3859): 1.37967,1.3837,1.37225,1.37225
OHLC(@serial3859): 1.37967,1.3837,1.37225,1.37332
OHLC(@serial3859): 1.37967,1.3837,1.37225,1.37439

and we can see only the last one is correct.

Anyone who knows if this is a bug or something else??
before2012
 
Posts: 15
Joined: Fri Aug 26, 2011 12:57 am

Re: bar_stream looks strange in IndicoreSDK 2.1

Postby sunshine » Thu Mar 15, 2012 2:59 am

You can select the mode of the history simulation in the Pre-deliver Prices parameter. For details please read History Simulation Mode in the Debugging Indicator article.
sunshine
 

Re: bar_stream looks strange in IndicoreSDK 2.1

Postby before2012 » Thu Mar 15, 2012 9:15 am

sunshine wrote:You can select the mode of the history simulation in the Pre-deliver Prices parameter. For details please read History Simulation Mode in the Debugging Indicator article.


So I really missed something. Thank you! 8-)
before2012
 
Posts: 15
Joined: Fri Aug 26, 2011 12:57 am

Re: bar_stream looks strange in IndicoreSDK 2.1

Postby Rorejevy » Tue May 29, 2012 5:47 pm

Completely I share your opinion. It seems to me it is good idea. I agree with you.
Rorejevy
 
Posts: 1
Joined: Tue May 15, 2012 12:46 am


Return to Discussions

Who is online

Users browsing this forum: No registered users and 1 guest