Hi guys!
I tried to experiment these last few days with the renko bars example found on the zorro manual:
var BarRange = 0.0005;
int bar(vars Open,vars High,vars Low,vars Close)
{
Open[0] = round(Close[1],BarRange);
if(Close[0]-Open[0] >= BarRange) {
Close[0] = Open[0]+BarRange;
High[0] = Close[0];
Low[0] = Open[0];
return 1;
}
if(Open[0]-Close[0] >= BarRange) {
Close[0] = Open[0]-BarRange;
High[0] = Open[0];
Low[0] = Close[0];
return 1;
}
return 4;
}
Then I coded a very simple strategy to buy after two consecutive bullish bars and sell after two consecutive renko bars. The results were too good to be true, so I thought that there must be something wrong. The logic seems fine and when I zoomed on the resulting chart, it seemed ok and to be executing the trades correctly.
My last experiment was to trade it live on a demo account yesterday and today I did the simulation for yesterday just to compare. When I did that, I found that Zorro is not doing the same on the demo account as it did on the simulation. Of course, the demo test was a complete fail, with trades resulting in fractions of a cent and doing a ton more trades than the simulation on the same period of time.
Can anyone help me understand what is going on here? Is there a bug on the backtesting of renko bars? Do I have to set up something additional to make it work in live or demo trading?
Any help would be very helpful, thank you!!