+1 888 340 6572
MultiCharts Project Management
previous_open_issue.png
Go to the previous open issue
previous_issue.png
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
feature_request_small.png
Open Feature request MC-531

Backing with multiple data series and accumulated bid and ask volume

action_vote_minus_faded.png
9
Votes
action_vote_plus_faded.png
next_issue.png
Go to the next issue (open or closed)
next_open_issue.png
Go to the next open issue
Description

I understand that currently backing testing precision (using bar magnifier) and extended back testing can only be applied to the main data series (i.e. trading instrument) , calculation based on secondary data series (i.e. data seies for intermarket analysis) are done only at the end of bar. For systems that use multiple data series (in particular systems that use IOG and intrabarpersist) , it would result in "look to the future" issue because all the calculation involving secondary data series are based on the value at the end of bar value but are used within the bar for order placing per IOG . This would result in faulty backing testing result and can never be reproduced under actual trading.

As a side note, the tick value of bid and ask volume are accumlated within the bar by default. If one uses intrabarpersist to accumlate the tick volume of the bid or ask within a bar will get faulty result because each tick is cumulative from the open of the bar.

It is suggested that backing testing precision should be extended to all data series on a chart and that the ask and bid volume for a data series, unlike trade volume, should not be accumulated by default.

Steps to reproduce this issue

input:printswitch(0);

var:intrabarpersist data1midprice(0), intrabarpersist data2midprice(0), intrabarpersist data3midprice(0);

data1midprice=((c of data3(v of data2+1))+(c of data2(v of data3+1)))/(v of data2+v of data3+2);
data2midprice=((c of data5(v of data4+1))+(c of data4(v of data5+1)))/(v of data4+v of data5+2);
data3midprice=((c of data7(v of data6+1))+(c of data6(v of data7+1)))/(v of data7+v of data6+2);

if printswitch=1 then print(file("c:\iog-testing.txt"),"Date : ",date, ". Time ",time_s, " data1midprice = ", data1midprice," data2midprice = ", data2midprice," data3midprice = ", data3midprice);

[intrabarordergeneration=true]

data1-data3 are trade,ask and bid price of trading instrument in 1 minute in interval
data4-5 are ask and bid price of second data series
data6-7 are ask and bid price of third data series

This is what the log file looks like. You will see that data1midprice is updated continuouly whereas data2midprice and data3midprice are updated once per minute, based on the closing price of the bar.

Date : 1110803.00. Time 153200.00 data1midprice = 5633.24 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5633.21 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5633.20 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5633.20 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5633.64 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5633.73 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5633.94 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5633.92 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.02 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.26 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.27 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.50 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.52 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.73 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.70 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.69 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.73 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.94 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.94 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.94 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.72 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.22 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.00 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.50 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.21 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.10 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.90 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.90 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.70 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.20 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.20 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.20 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.39 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.69 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.36 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.34 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.32 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.31 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.15 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5636.00 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5636.19 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5636.50 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5636.87 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5636.86 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5636.51 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5636.49 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5636.33 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5636.33 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5636.33 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5636.16 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5636.33 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.65 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.49 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.32 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.48 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.32 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.16 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.66 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.66 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.31 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.31 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.30 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.65 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5636.15 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.80 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5636.15 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5636.00 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.65 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.31 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.15 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.00 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.35 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.00 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5633.80 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.11 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.61 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.81 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.15 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.16 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.16 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.16 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.82 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.82 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.16 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.82 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.66 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.66 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.66 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.16 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.32 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.33 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.32 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.66 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.50 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5634.83 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.33 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.33 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.50 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153200.00 data1midprice = 5635.82 data2midprice = 1250.65 data3midprice = 3483.25
Date : 1110803.00. Time 153300.00 data1midprice = 5635.70 data2midprice = 1250.54 data3midprice = 3484.75
Date : 1110803.00. Time 153300.00 data1midprice = 5634.90 data2midprice = 1250.54 data3midprice = 3484.75

Comments (0)
History
Issue basics
  • Type of issue
    Feature request
  • Category
    Usability
  • Targeted for
    Not determined
  • Status
    Under Review
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (3)
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
  • Resolution
    Not determined
  • Severity
    Critical
Attachments (0)
There is nothing attached to this issue
Commits (0)
There are no code checkins for this issue
Duplicate issues (0)
This issue does not have any duplicates