Pb breakeven with the bars renko into the backtesting

Questions about MultiCharts and user contributed studies.
maubonvi
Posts: 16
Joined: 26 Sep 2014

Pb breakeven with the bars renko into the backtesting

Postby maubonvi » 07 Jan 2015

I asked Andrew (good support MC) explanations of the different behavior of the BreakEven between real and be with bars renko.

He told me that not being implemented according to barmagnifer winth renkobar.

Unfortunately the results of backtesting different from real life with renko bar if you use the function breakeven.

I ask for the opportunity to make a request to develop this option for the next release MC, so this already powerful sw will be even better.

I ask at the programmers if there is not the ability to write a piece of code to insert in my strategy to bypass this problem.

Thanks for any ideas.

Sorry for my writing in English is not perfect.

Great regards

MauroB
Attachments
pb_real_vs_bt.JPG
(242.09 KiB) Downloaded 800 times

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: Pb breakeven with the bars renko into the backtesting

Postby MAtricks » 07 Jan 2015

1. You're using a Breakeven stop. This is already a tricky thing to use. You must measure every tick of the bar to use the one provided in Power Language (don't use it). Learn the mechanics of this stop before using it and these questions would not be asked. Breakeven strategies can work (rarely do they actually benefit you in live trading), but you must finish the previous steps before understanding how.

2. You're using Renko bars. There are at least 25 problems and complications that I can think of at the top of my head with just using these bars. Learn the mechanics of these bars before using them and these questions would not be asked. The easiest and most reliable way to use Renko blocks is to ensure that all orders are ON CLOSE of bar. Resting orders (limits and stops) are possible, but much more complicated and definitely not recommended.

3. You're putting those two together... in all the wrong ways.. Just know the dangerous path you're heading down :)

Along with that, there are many other complications with Renko charts and Breakeven stops. All of which have been chatted about on here. Do a quick search on the forum.

maubonvi
Posts: 16
Joined: 26 Sep 2014

Re: Pb breakeven with the bars renko into the backtesting

Postby maubonvi » 08 Jan 2015

MAtricks Thank you for your kind answer.
I know the pitfalls of renko (in my opinion are interesting only those with the wick)
and therefore the use carefully.
In fact, the code I wrote is based only on closures of bars.
But I think that the renko bars have great potential along with some indicators and filters. what do you think?
The breakeven written in powerlanguage I saw that it works quite well in real but as you say you too, does not work for backtest control problems tick by tick of each bar renko.
I ask just that. As with barmagnifer control rods it gets tick by tick can not be extended for graphs not standard? I ask developers to MC.
I understand that it will not be easy but it will not be impossible.

Regards

MauroB

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: Pb breakeven with the bars renko into the backtesting

Postby MAtricks » 08 Jan 2015

You cannot use the Bar Magnifier with Renko charts. You have to calculate everything on the close of a bar. The breakeven price must be calculated on the close and the exit order must be executed on the close.

maubonvi
Posts: 16
Joined: 26 Sep 2014

Re: Pb breakeven with the bars renko into the backtesting

Postby maubonvi » 08 Jan 2015

ok ..Thank you both for your contribution. As I said before I wrote the code only considering closures bar.

...at the next.

Regards

MauroB

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: Pb breakeven with the bars renko into the backtesting

Postby MAtricks » 08 Jan 2015

Check your code. It is not written for end of bar. See your posted picture. It is executing at the Open which is quite the pitfall.

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: Pb breakeven with the bars renko into the backtesting

Postby MAtricks » 08 Jan 2015

Post your code if you want help with it. Also, see my first post here. The points are very valid and relevant to your situation whether you realize it yet or not :)

maubonvi
Posts: 16
Joined: 26 Sep 2014

Re: Pb breakeven with the bars renko into the backtesting

Postby maubonvi » 09 Jan 2015

MAtricks ok ..thanks. if you look at my image in the second frame, the chart BT opens at the close of the bar.
... good trading.

MauroB

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: Pb breakeven with the bars renko into the backtesting

Postby MAtricks » 09 Jan 2015

Yes, your code is not written for Renko charts. Again, please see my previous points about Renko charts and Breakeven stops. Your code needs to be rewritten for these.

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: Pb breakeven with the bars renko into the backtesting

Postby MAtricks » 09 Jan 2015

I feel like my help isn't helping when we have so many posts going back and forth saying the same thing. From your posted screenshot, I've concluded that the following steps need to be taken to resolve this problem:

1. Research Renko bars. Your strategy is not written to correctly use Renko bars. A Renko bar has the flexibility to move 3x its block size before ever closing and your strategy is not working correctly around those mechanics.
2. Research Breakeven stops. Your strategy is not written correctly to use Breakeven stops on Renko bars. Your breakeven stop is not written to CALCULATE and EXECUTE at the end of the bar. It cannot reliably calculate on a set number of points, it must calculate on bar closes of those points.
3. Remove all resting orders (stops and limits) and convert to end of bar orders e.g., "sell this bar on close"

Post your code or just your execution code if you'd like further help.

maubonvi
Posts: 16
Joined: 26 Sep 2014

Re: Pb breakeven with the bars renko into the backtesting

Postby maubonvi » 09 Jan 2015

In fact the first code was not written for the operations to closing bar .. now, I have wrote a new code and also the breakeven I don't calculated with the code of MC.
Annexed I send the chart image DAX with the new code.

Thank You

greetings

Mauro
Attachments
newcodeforRenko.JPG
(176.88 KiB) Downloaded 791 times

User avatar
MAtricks
Posts: 789
Joined: 09 Apr 2012
Has thanked: 286 times
Been thanked: 288 times

Re: Pb breakeven with the bars renko into the backtesting

Postby MAtricks » 09 Jan 2015

Your code still has resting orders, is still engaging intra bar, and will not work in live trade. Please see my previous points.


Return to “MultiCharts”