Timing of range bar C calculation
-
- Posts: 60
- Joined: 28 Dec 2007
- Has thanked: 9 times
- Been thanked: 1 time
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Timing of range bar C calculation
For Point (Range) resolution chart type:
The bar closes when the following condition is met:
Modulus |High - Low| > chart resolution * (MinMovement / PriceScale)
Price difference in points is equal to selected chart resolution.
A new bar is formed from the remainder of tick price with MinMovement*PriceScale offset.
The volume is allocated proportionally between all bars built from the tick (i.e. summarized tick volume is equal to summarized bars volume).
One tick is included into a bar only once (if the tick is split up-it will be calculated in the first bar, the bars will receive 0).
The bar closes when the following condition is met:
Modulus |High - Low| > chart resolution * (MinMovement / PriceScale)
Price difference in points is equal to selected chart resolution.
A new bar is formed from the remainder of tick price with MinMovement*PriceScale offset.
The volume is allocated proportionally between all bars built from the tick (i.e. summarized tick volume is equal to summarized bars volume).
One tick is included into a bar only once (if the tick is split up-it will be calculated in the first bar, the bars will receive 0).
-
- Posts: 60
- Joined: 28 Dec 2007
- Has thanked: 9 times
- Been thanked: 1 time
Re: Timing of range bar C calculation
Henry,
I am under the impression that in Range bars the C is calculated on the following first tick of the new open. The signal I'm trying to write trades on the first tick at the open, but also needs the data of the most recent close. Is there a way to calculate the last C and using that data order and execute a trade all during the opening tick?
Thanks,
Rick
I am under the impression that in Range bars the C is calculated on the following first tick of the new open. The signal I'm trying to write trades on the first tick at the open, but also needs the data of the most recent close. Is there a way to calculate the last C and using that data order and execute a trade all during the opening tick?
Thanks,
Rick
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Timing of range bar C calculation
You are describing a regular realtime calculation mode (no IOG). The script is calculated on the bar close. Order is placed on this bar close/ next bar open.Is there a way to calculate the last C and using that data order and execute a trade all during the opening tick?
This Bar on Close order is sent on the close of the signal generation bar.
Only market orders can be sent This bar.
Buy Next bar at open = Buy Next bar at Market