I know.....I know Renko! I’ve been using them successfully for years with manual trading and have been trying to creat some automated signals based on the indicators that I use visually.
The basic setup although the time period and points are random. I’ve tried different settings but get the same results.
- Multi Chart 11
- 3 Minute Renko
- 2 point bars
- No Phantom bars
- No show real open
- brake on session
- trade RTH ES
- No offsets
Code: Select all
If timeFilter and marketposition = 0 then
begin
If barstatus(1)= 2 then
begin
If (Stratagey Logic Here) then
begin
sellshort ("Short1") 1 contracts this bar on Close; //needed for backtest with Renko
end;
end;
end;
If marketposition = -1 then
begin
If barstatus(1)= 2 then
begin
If (Stratagey Logic Here) then
begin
buytocover ("E1") from entry ("Short1") 1 contracts this bar on Close;
end;
end;
end;
First: As we all know Renko bars are price based and not time based although they have a time component. This time component is the measurement period whereby the bar decides if the point range has been exceeded thus causing a new bar to be formed. In this example at 3 minute intervals the bar performs a check and can either close and form a new bar or continue on with this loop. I’m finding that my strategy is closing on the first iteration of the time loop regardless of how long the bar is in existence. So let’s say that my 3 minute bar takes 30 minutes to exceed the 2 point range and form a new bar my strategy fires at the end of the first 3 minute period leaving 27 more minutes until actual bar close.
When bars are formed at the end of the first 3 minute period things perform as expected on the close of that bar. It’s only when a bar goes beyond the first 3 minute period that I have problems.
Secondly: When the strategy is applied to a historical chart the trades on the historical chart happen exactly one bar prior to where they happened in real time. I’m stumped as to why! I can use code to work around this and delay the trades one bar to mirror real time but would prefer to actually have the strategy trade as it backtest or backtest the way it trades if that makes sense!
Thanks everyone for some much needed help.
GuppyDRV