Australian (ASX) Stock Market Forum

Dump it Here

x.png

I'm starting to wonder if anyone on this forum is legit when they can't run a backtest and bar replay.

Or perhaps it's just that people don't read properly. The period is very low, p = 0.0001, and there's a 1 day delay.

Or maybe it's that some people can't admit being wrong.

Or maybe it's just a team sport. Skate is my online buddy, so I will agree with everything he says, and not bother to check anything myself.

Is there anyone here who has run the backtest using my code? If not, how can you argue that zz can't be used safely in a backest? Just because some website says "don't use it!" doesn't mean that's the final word. DYOR and stop believing what others say.
 
Last edited:
Skate is my online buddy, so I will agree with everything he says,

Expressing our views respectfully
When alternative views are expressed they shouldn't include ridiculing others as it serves no purpose, it's like masturbating in public, it may feel good to you, but it looks disgusting to everyone else and it just makes the other person work harder to find ways to disagree with you.

Whether your view is right or wrong isn't important
What's more important, this thread gives you the ability to express your views without being ridiculed or challenged. If you disagree with someone rather than argue the merits of their points, post an alternative view, you don't have to belittle members to get your point across. Play "the point" not "the person"

We are all wordsmiths to some degree
It's easy to incite an emotional, knee-jerk response, creating an emotional outburst that could undermine the friendly atmosphere we have taken so long to build.

Skate.
 
Expressing our views respectfully
When alternative views are expressed they shouldn't include ridiculing others as it serves no purpose, it's like masturbating in public, it may feel good to you, but it looks disgusting to everyone else and it just makes the other person work harder to find ways to disagree with you.

Whether your view is right or wrong isn't important
What's more important, this thread gives you the ability to express your views without being ridiculed or challenged. If you disagree with someone rather than argue the merits of their points, post an alternative view, you don't have to belittle members to get your point across. Play "the point" not "the person"

We are all wordsmiths to some degree
It's easy to incite an emotional, knee-jerk response, creating an emotional outburst that could undermine the friendly atmosphere we have taken so long to build.

Skate.
You started this whole thing by rubbishing a useful indicator I posted for general interest. Scroll back and you'll see what I posted was quite harmless. You started hacking into it. ok, you're allowed to do that, but you need to make sure you're correct. Otherwise I'll defend my point of view.

You know what's disrespectful is thinking I wouldn't notice when you deliberately changed my code. You tried to pull the wool over my eyes. You must think I'm an idiot. I respect people who are honest and fair.

"What's more important, this thread gives you the ability to express your views without being ridiculed or challenged".

If the idea of ASF is just to have friendly banter, then maybe I'm in the wrong place. No one can be challenged?? Why did you challenge my harmless post then?
 
You started this whole thing by rubbishing a useful indicator I posted for general interest.

@Gringotts Bank you started this dialogue

ZIgzag is a beautiful indicator, underused imo. Of course lookahead bias must always be considered, but that can be negotiated easily enough.

I could have avoided playing tennis by "agreeing with you" but "that would mean we'd both be wrong"

From my research
I warned others about the dangers of using the ZigZag indicator when backtesting & trading. I've gone to great lengths to explain why in detail. I also explained the "usefulness" of this indicator & when it should be used.

You started hacking into it. ok, you're allowed to do that, but you need to make sure you're correct. Otherwise I'll defend my point of view.

I've expressed my opinion of the ZigZag indicator & so have you
Readers will decide which they accept. If you read my last post it's not about defending your view it has more to do with posting an alternative view.

You must think I'm an idiot. I respect people who are honest and fair.

No, far from it
@Gringotts Bank you have my deepest respect.

As I've said numerous times before, reading only my views on trading can be unhealthy at times, that's why I appreciate when others make a contribution. An alternative point of view is always welcome, but being a "smart-arse" & making provocative comments, isn't.

Not everyone agrees with me
I've made 4,172 posts & in that time I've copped some harsh criticism even harsher criticism in private messages but never have I been disrespectful to anyone. Every post I make is made with the sole purpose of helping someone else. Also, it should be noted, I've never called anyone a "fucknuckle" even when I've been tempted.

Skate.
 
Hi all, I have a question someone may be able to help me with (completely off the current topic)

I am trying to trade low volume / turnover stocks in the US with a very basic mean reversion strategy. The strategy uses limit orders for entries. Now in Australia with the ASX as I understand it, if a limit order is submitted to the market before the open, the openg auction will consolidate the orders and should the OPEN price be less than my limit price I would be filled at the OPEN price.

Now I seem to have foolishly assumed the same thing happens in the USA.

Here is a chart from tradestation. I submitted a limit order (via TS automation) to enter at a limit price of $145.97.

The OPEN of the candle was $143.39.

My order was filled at my limit price of 145.97, which both TS and Norgate data both say the high of the day was $145.00

So how was I filled at a price which is outside the candle?

Have I missed something ridiculously obvious???

Cheers
Matt
trade image.jpg
 
Hi all, I have a question someone may be able to help me with (completely off the current topic)

I am trying to trade low volume / turnover stocks in the US with a very basic mean reversion strategy. The strategy uses limit orders for entries. Now in Australia with the ASX as I understand it, if a limit order is submitted to the market before the open, the openg auction will consolidate the orders and should the OPEN price be less than my limit price I would be filled at the OPEN price.

Now I seem to have foolishly assumed the same thing happens in the USA.

Here is a chart from tradestation. I submitted a limit order (via TS automation) to enter at a limit price of $145.97.

The OPEN of the candle was $143.39.

My order was filled at my limit price of 145.97, which both TS and Norgate data both say the high of the day was $145.00

So how was I filled at a price which is outside the candle?

Have I missed something ridiculously obvious???

Cheers
Matt
View attachment 149023
Depends on your broker. Unfortunately this happens sometimes on ASX too.
 
A bit harsh captain, you mean some of the data..as used then in BT might not be accurate.
Do you happen to know if Northgate data package is accurate and include these aftermarket last fill?
Some brokers will execute a trade between their own clients that may be outside the day's candle as per ASX. I don't know why / how etc, but I have been told this by high frequency traders. I've been told its not common but it does happen occasionally
 
My question is
Would you be kind enough to update the backtest results for the 2022 calendar year (up until today) for those interested in your WTT "Turnkey Strategy"

Covid WTT Results.jpg


It's nice to have @Nick Radge back on the forum being active
Nick might have missed my question so I'll refer to it again. I'm sure those who follow the WTT Strategy would be interested in how the strategy has performed since July 2022.

Skate.
 
@Willzy Just check your TradeStation is set to execute during regular hours only. I'd suggest your limit order was fillef in the pre-market.
Many thanks Nick, I'll look into that right now, not sure where to look for that setting, I was using Daily candles on the regular session.

The EL code I was using is
////////////////////////////////////////////////////////////////////////////
if marketposition = 0 then
buy numShares contracts next bar at entryLimit limit;

if marketposition = 1 then
sell all contracts next bar at exitLimit limit;
///////////////////////////////////////////////////////////////////////////

Is what your refering to a setting or perhaps should I start operating on the intraDay bars say 5 minutes... (quite tedious but possible I guess)

The other thing I thought it might be is that the order routing is using TradeStation's proprietary "Intelligent" routing for a lower comisison perhaps I might need to specify the NASDAQ or AMEX routing...

Cheers,
Willzy
 
Many thanks Nick, I'll look into that right now, not sure where to look for that setting, I was using Daily candles on the regular session.

The EL code I was using is
////////////////////////////////////////////////////////////////////////////
if marketposition = 0 then
buy numShares contracts next bar at entryLimit limit;

if marketposition = 1 then
sell all contracts next bar at exitLimit limit;
///////////////////////////////////////////////////////////////////////////

Is what your refering to a setting or perhaps should I start operating on the intraDay bars say 5 minutes... (quite tedious but possible I guess)

The other thing I thought it might be is that the order routing is using TradeStation's proprietary "Intelligent" routing for a lower comisison perhaps I might need to specify the NASDAQ or AMEX routing...

Cheers,
Willzy
Just following up, it seems the order was filled at the OPEN 09:30:01 - I'm at loss with this, my other limit orders with TS have worked flawlessly for the last 6 months using Nick's Day Trade Strategy, but I have to enter those trades manually... maybe thats the key dont rely on their automation?
 
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
1668080314662.png
1668080277322.png


Yeah..Dream machine
so the real question is :too good to be true? is there a future looking?
1668080476804.png
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)
1668082215509.png
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
1668082533391.png
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
1668083557814.png
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
 
@qldfrog

Did you use this code ?

PositionSize = 10000;
pr = .00001;
zzHiLo = Zig( c, pr );
pk = zzHiLo>Ref(zzHiLo,-1) AND zzHiLo>Ref(zzHiLo,1); <==== testing tomorrows Zig(close,pr)
tr = zzHiLo<Ref(zzHiLo,-1) AND zzHiLo<Ref(zzHiLo,1); <==== testing tomorrows Zig(close,pr)
SetTradeDelays(1,1,0,0);
BuyPrice=SellPrice=C;
Buy = tr;
Sell = pk;


I don't believe you can use the open as pk and tr are actually testing against the next days close. It's possible to trade this using the close as you could theoretically calculate the values and place orders just prior to the close.

Oh and yes i rewrote the code this morning and zig seems to automatically generate that error. Swapping it out with ROC can get rid of it.
 
Top