- Joined
- 30 June 2007
- Posts
- 7,200
- Reactions
- 1,226
[edited]Trying to put a balancde view and ensuring everyone is expressing his her view here:
I did include code graciously provided by @Gringotts Bank in a weekly system setup ;with the trade delay..as all my systems do:
using it in the 2022 calendar year->this is good
There is one change vs GB, my price for buy sell are at the open (only implementation I can performed) and not at close but i do not believe this should affect the issue
View attachment 149031
View attachment 149030
Yeah..Dream machine
so the real question is :too good to be true? is there a future looking?
View attachment 149032
As the Zig function is used , the AB check will say yes..so no surprise here but is the diagnostic right using GB sauce?
We can not blindly trust AB as we are not aware of the internal and if Zig is marked internally as future, this is maybe a hasty conclusion.
Is the looking forward restricted to 1 bar ahead and then removed by the added delay
I usually include this snippet in my code to detect [visually] future looking
//future leak detection
EnableNulling = ParamToggle( "NULLing of Data", "DISABLED|ENABLED", 0 );
RM = Param( "NULL Bars L<-R", 0, 0, 1000, 1 );
if( EnableNulling )
{
Z = Null; //or 0 if you want easier to read graph
LB = LastValue( BarIndex() ); //this triggers a future looking alert
O = IIf( BarIndex() > ( LB - RM ), Z, O );
H = IIf( BarIndex() > ( LB - RM ), Z, H );
L = IIf( BarIndex() > ( LB - RM ), Z, L );
C = IIf( BarIndex() > ( LB - RM ), Z, C );
}
By switching this on:
as you move back and forth along the date axis,
the area outside the displayed is zeroed and in normal circumstances, all calculations based on data in the future of the displayed area will have no knowledge of the future values.
With the parameter, you can even pushed backward the zeroed data before the end of the displayed timeline
When I create future leaks (obvious ones) in my code, it is reflected by seeing buy or sell signals disappearing as they approach the last displayed dates
I will carry on now to show the results of GB's code for RED on the asx: (RED was one of the last buy requested by the system BT)
View attachment 149035
so the week before week 9/09 I have a buy triggered (green arrow) which is implemented on the 9/09 at 22c and I have zeroed all data past that 09/09 date
Next step:
now I wipe out the week 9/09 data values (knowledge) so that we are now in the real world situation we were at on the previous week 02/09 when the buy was triggered
View attachment 149037
no signal anymore so we will not buy on the 9/09 at open 22c and lose that early entry.
=>That does not work for me so as is , it is future looking and I can not rely on BT
Remember that I buy and sell on open and not close, on Monday morning and not Friday night at 4PM
If we could pass order then, would this work better?
What if I do my run on Friday at 3PM, I assume that I have a similar value then as at close and then "gain an extra week" [or day bar on a daily ]knowledge.
Maybe
So even if I can not implement it, I change buy and sell price to be the ones at close instead of open , and only change that
(BuyPrice=SellPrice=C, and rerun my BT
Not good.at all with 77% losers
View attachment 149040
only if I remove the trade delay do I get great results->
so I suggest run on Friday close including the week knowledge [and with BT not a true accurate image of possible run]
I am afraid that code, at least for a weekly , while great to display historical trend inflection points does not help me in the actual RT order triggering.
Obviously, I might have made a mistake, etc but I am afraid this is no holy grail yet.
I will have to check @Nick Radge entry to get to understand his code and see if I can learn further
Thanks GB for your code and openness .Trends are multi days so if you run a system daily and maybe miss the first bar of a trend, it is no big deal, you still get a quick signal but BT will not be very representative
Remember all this is just a reflection on my searches tonight and biased toward weekly systems, orders at open.
DYOR
I can not categorically say it is useful, I suspect it could be good for day traders or week close traders
@peter2 could maybe tell us if he considered or uses a ZZ twist to get some indicators for trading toward the week close?
have all a great night, let's keep the conversation flowing and the posts polite and positive
Buyprice = Sellprice = close;
Skate removed the buy and sell price from my code, saying the were redundant (!!!), because he didn't understand what I was doing. He also removed the trade delay. Took my code, ruined it, then tries to tell me it's nonsense!
The code I posted is not profitable. I never said that, and nor did I even hint at it. I said it was safe to use zz in a backtest. The picture I posted (the very first post) uses zz to identify sharp angles in the zz code, colouring the swings yellow. This can be used to identify reversals.
Last edited: