Rare Spikes in Output

Questions about MultiCharts and user contributed studies.
multichartsUser23
Posts: 15
Joined: 02 Mar 2018
Has thanked: 3 times

Rare Spikes in Output

Postby multichartsUser23 » 27 Jan 2019

Hi all,

I came across a weird occurrence where a print statement of mine (placed directly after my order entry statement, so as to generate the date and time of orders) was triggered in instances in which no trade showed up at that date and time on the backtest.

Such an occurrence was very rare given the number of times I ran this code over a large number of individual symbols, so I decided to investigate deeper by simply running the following print statement and nothing else to see how many lines of output would be generated for the minutes in which these mystery trades absent from the backtest occurred:

Code: Select all

if barstatus(2)<>2 and not(barstatus(1)=2 ) then #return;
print(date, time);
Normally, each minute printed will have 3 entries, as my first data stream is of the 20-second interval and my second data stream is of the 1-minute interval, meaning that because there are 3 20-second bars in each 1 minute bar, there will therefore be 3 lines of identical output.

However, the minutes where these strange trades showed up in the output but not in the backtest, there were maybe 50 lines of identical output instead of the normal 3. I have no idea why this would be, as I examined that minute of data in QuoteManager, and nothing looked out of the ordinary.

Does anyone have any idea what could be causing this strange occurrence so that I can figure out what happened with these trades for myself?

Thanks!

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 140 times

Re: Rare Spikes in Output

Postby Anna MultiCharts » 30 Jan 2019

Hello, multichartsUser23!

Please provide your workspace and study so that we could analyze this.


Return to “MultiCharts”