Relative bars using Intrabar Order Generation

Questions about MultiCharts and user contributed studies.
PD Quig
Posts: 191
Joined: 27 Apr 2010
Location: San Jose
Has thanked: 67 times
Been thanked: 10 times

Relative bars using Intrabar Order Generation

Postby PD Quig » 17 Jan 2011

I’ve written a system that oscillates long and short between support and resistance values that are recalculated dynamically.

I am getting the intrabar entries and exits I expected, but being the first time I’ve used Intrabar Order Generation, I am not clear on how to track events happening on specific bars. For example, I can see that performance would be better were I to avoid entering a new position if X number of consecutive bars (including the entry bar) have crossed one of the lines.

Normally, I would use CurrentBar to capture the bar where the position was entered, initialize the counter, and then increment the consecutive bar counter. But IOG has me confused: the statement “sell next bar at market” really means next tick. So, how then do you refer to bar relative positions? For example, can you still use “ low[1] “ to refer to the last bar’s low? I'd really appreciate it if anybody has a clean, easy way to accomplish this.

Thanks in advance for the guidance.
Last edited by PD Quig on 17 Jan 2011, edited 1 time in total.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Relative bars using Intrabar Order Generation

Postby TJ » 17 Jan 2011

...can you still use “ low[1] “ to refer to the last bar’s low? I'd really appreciate it if anybody has a clean, easy way to accomplish this.

Thanks in advance for the guidance.
with intrabarordergeneration,

1. the bar reference "[1]" remains the same.
2. the only change is order next bar will be executed as order next tick. (note underline highlight above)



ps. I have corrected the syntax in your quote... for bar reference, square brackets are used, not regular brackets.

PD Quig
Posts: 191
Joined: 27 Apr 2010
Location: San Jose
Has thanked: 67 times
Been thanked: 10 times

Re: Relative bars using Intrabar Order Generation

Postby PD Quig » 17 Jan 2011

Thanks TJ. Got it. I appreciate the help and the syntax correction.


Return to “MultiCharts”