1minute OHLC vs every tick - opposite results - page 4

 

I was not thinking about SL and TP but it make sense. I'll try to forget the 1 min. OHLC and the 7-8 $Mo of cash.

Thank you for this explanation.

 
Florew:


Not sure to understand your point. In my opinion it must be possible to reproduce le 1 minute OHLC mode simulation.

Documentation says : 

Then :

Question is : how many control points in OHLC minute bars and how to modify the onTick() function to work on each of them ?

According to the text in both quotations I understand the response for the first question is always 4, because if a bar has more than 4 ticks it is "significantly" reduce to speed up testing time.  For next question, the thing is to identify the 4 controls points of the 1 minute OHLC bars in real market condition, then ask onTick() to work on them.

I can answer just for my case. the two performances (ohlc vs everytick) are very different because of the logic of my EA:

my EA enters long when the price is let's say 100 pip below 50period EMA so we're having a bear bar and if the close is  50 pips below EMA but the low is below 200pips it enters 200pips below EMA while in reality if the bar were made of 100ticks it would have gone long around 100pips below the EMA, so if market turns in favorable direction in the first case we have bought at lower price than the second getting a bigger profit.

so basically what I meant was that the very good profit I was getting by using the same EA and same parameters on many currencies pairs was not reproducible.

I've then modified the function moving the code that controls buy/sel condition inside the if(isNewBar) {}. in this way I get almost the same result in ohlc and everytick mode

so now what is reproducible (both in everytick and ohlc ) is a great loss on almost every currency pairs

 

OHLC mode can be taken advantage of. In the case of the Bull_Candle below, the price jumps from the Open ---->Low. If someone uses an algorithm like.

if( Previous_Ask > Current_Ask ) OrderSend( BuyPosition );

This person will get an instant dis-count of 3 [ Points | Pips ]. This is usually enough to over-come the Spreads. This creates a mathematical edge.

I decided to avoid m1_InterBar testing and trading for this reason. And choose to use isNewBar() or oncePerBar() whatever you wanna call it for my trading both in Testing and Live. If my system cannot overcome that then too bad.

People seeking greater price resolutions should look toward 1_Second[BarChart] or even better Tick_Charts whenever they become viable.

 

 
I don't understand this myself because 1 minute OHLC is exactly what its name implies, its a 1 minute candle, which is the smallest bar, and it has 4 values, the high,low,open, and close values. So regardless of what the ticks are doing within a 1 minute candle the ticks will never go beyond those 4 values. So in theory, a backtest on 1 min OHLC should perform exactly as it does with "real" ticks, yet evidently it doesn't.
 
Jordi Bassaganas:

This discussion raises two "very simple" fundamental questions.

1. Why the "1 minute OHLC" mode is able to produce such good results?

2. Is it possible to approximate real trading (or "Every tick" mode, for me both are the sime right now) to "1 minute OHLC"?

3. When should you test your trading strategies under "1 minute OHLC"?

The questions are very clear and simple.. Who can answer them? The most important is 1.

Thank you very much! 

P.S.: Anyway you're right, everything is in the manual but there are many things to read, study and master. Thanks for the links about the 1 minute OHLC algorithm, which is not very very trivial at a first glance. 

I understand exactly what you are asking because I have the exact same problem. People who have not played with backtesting very much will not understand. 

I don't understand this problem myself because 1 minute OHLC is exactly what its name implies, its a 1 minute candle, which is the smallest bar, and it has 4 values, the high, low, open, and close values. So regardless of what the ticks are doing within a 1 minute candle the ticks will never go beyond those 4 values. So in theory, a backtest on 1 min OHLC should perform exactly as it does with "real" ticks, yet evidently it doesn't.

The only thing I can think of is that it is something to do with the tick "fluctuations" on the candle high, low "tails" that occur before it closes in live or real tick backtest trading that make the difference although I don't fully understand why the difference in the results would be so dramatically different from real ticks to ohlc in the backtests.

 
Florent:

I was not thinking about SL and TP but it make sense. I'll try to forget the 1 min. OHLC and the 7-8 $Mo of cash.

Thank you for this explanation.

I made an ea that gets over 100 Million dollars from 100 when back tested using ohcl candlesticks and I did not realize the ea does not work on real ticks and real ticks based of real data. When back tested over for over 20 years there is never a year when there is not a profit and the bot gets from 100 dollars to around 25 to 75 thousand dollars when the back test is started at any point in time in under four months and over a million in less then 10 months. The EA uses two buy and sell trailing stops, break even, and a candlestick pattern I made, if you have made progress I would appreciate an explanation to how you replicated ohcl conditions on live ticks and how to solve the problem. The bot uses fixed entry and exit points that does seeminlgy not depend on using ohcl candlesticks I may be able to determine how to solve it or we can work together?
 
SocratesPhilosopher:
I made an ea that gets over 100 Million dollars from 100 when back tested using ohcl candlesticks and I did not realize the ea does not work on real ticks and real ticks based of real data. When back tested over for over 20 years there is never a year when there is not a profit and the bot gets from 100 dollars to around 25 to 75 thousand dollars when the back test is started at any point in time in under four months and over a million in less then 10 months. The EA uses two buy and sell trailing stops, break even, and a candlestick pattern I made, if you have made progress I would appreciate an explanation to how you replicated ohcl conditions on live ticks and how to solve the problem. The bot uses fixed entry and exit points that does seeminlgy not depend on using ohcl candlesticks I may be able to determine how to solve it or we can work together?

You can not solve it. You have found a tester grail. That is, you exploit the method of generating ticks. Study the manual to see how ticks are generated either with every tick or OHCL mode.

It will never work in real - there is no point in solving. It is useful only in providing beautiful reports for selling a useless bot or to debug your code.

 
Jordi Bassaganas #:

I send now a trick for only "ticking" in one bar. You just have tu put this logic at the beginning of the tick. If the bar is not new then exits...

In which situations do you think that this trick may work well?

What would you also recommend to solve those extra ticks? Is there an article or so explaining this? Thank you.

Dude...

Sleep();

^

|

|

Whats wrong with just this?

 
I've got this fenomenon too,the anwer is pretty much simple actually, the reason is that using OHLC you kind of know the future and it always makes better results , you know what's the lowest price in every minute but in reality you don;t know this..You can send me message i'll explain:)
 
Alekss Zukovskis #: Whats wrong with just this?

Sleep doesn't work in the tester.

Reason: