Hi, I would like to create a function that runs through my code when 1minOHLC prices update instead of Every Tick.
I make money when I backtest on 1minOHLC modelling but not on *Real Ticks* modelling, so I would like to mimic placing trades on 1minOHLC.
use 1 minute bars, check for new bar (plenty of info here how to do that) when a new bar run your function
Hi, I would like to create a function that runs through my code when 1minOHLC prices update instead of Every Tick.
I make money when I backtest on 1minOHLC modelling but not on *Real Ticks* modelling, so I would like to mimic placing trades on 1minOHLC.
example:
void OHLC
{
// Run code here
}
instead of:
void OnTick()
{
// Run code here
}
I just don't know how to call my OHLC function.
Can Anyone help?
Thanks in Advance!
You can grab the open price easily, but the high & low prices are known only at the end of the candle - the close price being the next open price ... the only possibility using that way is to trade on new bar
Then you will realize this method of simulation does not correlate to a real tick feed.
Are there ways of getting around this?
use 1 minute bars, check for new bar (plenty of info here how to do that) when a new bar run your function
Unfortunately this is the same as using Open Prices, which simply doesn't work for my strategy.
Thanks for the suggestion.
Are there ways of getting around this?
No. You should only test on ticks based on real ticks. OHLC is good only for self deception or pretty pictures for market sellers.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, I would like to create a function that runs through my code when 1minOHLC prices update instead of Every Tick.
I make money when I backtest on 1minOHLC modelling but not on *Real Ticks* modelling, so I would like to mimic placing trades on 1minOHLC.
example:
void OHLC
{
// Run code here
}
instead of:
void OnTick()
{
// Run code here
}
I just don't know how to call my OHLC function.
Can Anyone help?
Thanks in Advance!