Australian (ASX) Stock Market Forum

Dump it Here

Joined
14 January 2010
Posts
232
Reaction score
438
YUP, BB System IMO.
Skate, your preferred "Selected Period "seems to be 3 weeks.
So can you enter, or program a WMA 15 into the system (15 = 15 trading days in the 3 week Selected Period).
Maybe a WMA 21 would be ok.
 
Joined
28 December 2013
Posts
3,390
Reaction score
15,894
YUP, BB System IMO.
Skate, your preferred "Selected Period "seems to be 3 weeks.
So can you enter, or program a WMA 15 into the system (15 = 15 trading days in the 3 week Selected Period).
Maybe a WMA 21 would be ok.

"don't let the simplicity of this system fool you".

@DrBourse the point of the exercise was to do a "series of posts" on an article I was supplied within a private message from a member I respect. After reading the article "it was something new to me" so I decided to share my findings. I assumed trading a "3-Week Moving Average Channel Strategy" wouldn't have legs as a trading system that's why I remarked "don't let the simplicity of this system fool you" as it did me.

I'm not suggesting it's a strategy to trade but a different way of trading
The results in its rarest form aren't too shabby & with a slight adjustment to the exit strategy, the strategy grew an extra leg. I also highlighted the drawdown of this strategy was beyond my tolerance level. Without inspiration from others, it's hard to post content that may hold some interest for others.

Built-in Functions
I've never really thought about the in-built functions of Amibroker as a "Black Box" system but rather an arrangement of functions that have been already expertly coded. Another thing that I would like to mention is the speed of the calculations in Amibroker brought about by the use of ARRAYS is a sheer touch of brilliance.

Skate.
 
Joined
28 December 2013
Posts
3,390
Reaction score
15,894
Correction for transparency
The raw Amibroker code that I have used has an array error. The Amibroker Array (SMA1) was incorrectly used it should have been (MA1) that the "BuyFilter2" array references.

#1. WMA Buy & Sell Condition
Periods1 = Param("Periods1",3,1,750,2);
Periods2 = Param("Periods2",3,2,750,2);

WMA1 = WMA(H,Periods1);
WMA2 = WMA(L,Periods2);

BuyFilter2 = C > WMA1;
SellFilter2 = C < WMA2;

BuySetUp = BuyFilter2 AND WeeklyFilters AND NOT OnLastTwoBarsOfDelistedSecurity AND NorgateIndexConstituentTimeSeries( "$XAO.au" );
StaleStopExit = SellFilter2 OR OnSecondLastBarOfDelistedSecurity;

OR

#2. SMA Buy & Sell Condition

Periods1 = Param("Periods1",3,1,750,2);
Periods2 = Param("Periods2",3,2,750,2);

MA1 = MA(H,Periods1); // Correction made - SMA1 used in the orignal posted code instead of MA1
MA2 = MA(L,Periods2);

BuyFilter2 = C > MA1;
SellFilter2 = C < MA2;

BuySetUp = BuyFilter2 AND WeeklyFilters AND NOT OnLastTwoBarsOfDelistedSecurity AND NorgateIndexConstituentTimeSeries( "$XAO.au" );
StaleStopExit = SellFilter2 OR OnSecondLastBarOfDelistedSecurity;

# I apologise for the mistake

Skate.
 
Joined
8 June 2008
Posts
8,084
Reaction score
9,180
OK, so unless you can select your own "weighted average setting for the selected period", then it's a "BB System", Dangerous to say the least - I have always avoided BB Systems.

With all Software Trading Platforms, the crucial thing is that the user "Must be able to Drive EVERYTHING", otherwise we have no idea how their formulas are constructed.
That is, they could be built so that the Software gives a result desired by those that constructed it in the first place.
In other words, they could have programed the WMA to always show results that are below the Black Box Systems favoured EMA & SMA.

Years ago I challenged a couple of BBSystem Providers, they all refused to explain their "in house formulas" - anyone with an enquiring mind would have to as 'WHY the reluctance to be truthful'.

Count me out of this discussion, Personally I would not place any creedence in any of their results.

Sorry M8
you got it completely wrong @DrBourse here :) sorry , you can "Drive everything"
Amibroker is a C like programming language with loops etc, and you are in full control if you wish so to redefine WMA EMA etc as per your fancy and add tweak on it there are a few preset fct but you can write your own as well
as raw as possible while giving you convenience.
But I think Mr Skate sorted his issue
 
Joined
8 June 2008
Posts
8,084
Reaction score
9,180
OK qldfrog, never used Amibroker, so I was flying blind with most of my questions, just wanted to make sure it was totally driveable, and not a Black Box System.
NP.
Cheers
fully understood, no grief, it is good to have some differing and sometimes confrontational (is that english?) opinions
Have a nice week end,
 
Joined
24 December 2013
Posts
96
Reaction score
129
Captain Obfuscation (aka the bull headed one) inferring Amibroker is a blackbox system? That's rich, must be why the Amibroker user manual is 1478 pages long, after all its such a simple black box. :roflmao:
 
Joined
8 June 2008
Posts
8,084
Reaction score
9,180
Captain Obfuscation (aka the bull headed one) inferring Amibroker is a blackbox system? That's rich, must be why the Amibroker user manual is 1478 pages long, after all its such a simple black box. :roflmao:
Misunderstanding i am sure
.this thread is for sharing , challenging status quo and ideas.all are welcome and no point being harsh here please🙏
 
Joined
28 December 2013
Posts
3,390
Reaction score
15,894
Update background colour.png
The 2 year backtest below is for comparison that includes the COVID period
The results below use a "3-Week MA" of the "High" & the "3-Week MA" of the "Low" forming a channel equal to the average weekly volatility for the 3-Week period with slight alterations to the original code.

The re-coding of the original strategy was slight but extremely time-consuming
Both strategies incorporate a Stale Stop, Trailing Stop & TakeProfit Stop but the most recent version of the strategy is the one on the right. The improvements were worth the effort. The original strategy (the one on the left) I wouldn't consider trading but with the improvements, I would. The low channel exit as suggested by the strategy developer has been removed from the "Stale Stop Exit" using my default setting instead was where the biggest improvement came from. The "system drawdown" is now within my limits.

The slight re-coding has changed the metrics
As a mechanical system trader, I find it difficult to trade a system knowing that strategy improvements always come at a cost that I have highlighted in red.

3-Period Moving Average Strategy with Side by Side Comparison.jpg

Trading a 3-Week Moving Average Channel
Overall it was a worthwhile exercise & I thank the member for passing on the information.

Summary
Would I really trade the updated "3-Week Moving Average Strategy"? - Nah, not really.

Skate.
 
Joined
28 December 2013
Posts
3,390
Reaction score
15,894
"Most People Have No Idea What's Coming"
@ducati916 has been warning that 2022 will have its challenges but Peter Schiff's steps it up to the next level.

The warning is simple
“This is a completely dysfunctional economy that is going to collapse when the bottom drops out of the dollar. I think that crisis is close at hand with everything being in a bubble except gold and silver because gold & silver are real money".

Peter Schiff is a seasoned Wall Street prognosticator
Best known for his accurate predictions of the performance of the stock market, commodities, gold, & the dollar.

Peter Schiff's last warning
"We really couldn’t survive the economic downturn. So, the Fed bailed us out with more money printing. You know, we haven’t been innovating our way out of the crisis. We’ve been printing our way out. But we’ve printed out way into an even bigger crisis because now we’re paying the piper. Because this inflation acts as a lag. In fact, I think we’re still dealing with the inflation that was created before the pandemic. Wait until we catch up to the even greater inflation that we created after.”

The short video below is extremely interesting
Peter Schiff speaks about the U.S but the message is a world issue. Inflation, economy, U.S dollar, money printing & more. Peter remarked getting interest rates to "Zero" was easy, lifting them will be the challenge.



Skate.
 

MovingAverage

Quant Wannabe
Joined
23 January 2010
Posts
1,004
Reaction score
1,862
View attachment 135950
The 2 year backtest below is for comparison that includes the COVID period
The results below use a "3-Week MA" of the "High" & the "3-Week MA" of the "Low" forming a channel equal to the average weekly volatility for the 3-Week period with slight alterations to the original code.

The re-coding of the original strategy was slight but extremely time-consuming
Both strategies incorporate a Stale Stop, Trailing Stop & TakeProfit Stop but the most recent version of the strategy is the one on the right. The improvements were worth the effort. The original strategy (the one on the left) I wouldn't consider trading but with the improvements, I would. The low channel exit as suggested by the strategy developer has been removed from the "Stale Stop Exit" using my default setting instead was where the biggest improvement came from. The "system drawdown" is now within my limits.

The slight re-coding has changed the metrics
As a mechanical system trader, I find it difficult to trade a system knowing that strategy improvements always come at a cost that I have highlighted in red.

View attachment 135952

Trading a 3-Week Moving Average Channel
Overall it was a worthwhile exercise & I thank the member for passing on the information.

Summary
Would I really trade the updated "3-Week Moving Average Strategy"? - Nah, not really.

Skate.
That ratio of consecutive losers to consecutive winners of 2.5x would be mentally very tough to trade
 
Joined
17 October 2012
Posts
659
Reaction score
1,249
Very true MA. As a generality (not commenting on Skate's backtest specifically), many of us initially think below 40% win rate is palatable, but is actually pretty "miserable" lot of the time over the long run. Doable, but lots more discipline and gumption required in the long run.

Must confess I personally watch % winners closely in backtests, but will have to keep a better eye on the "consecutive win" or loss parameters during backtesting.
 

MovingAverage

Quant Wannabe
Joined
23 January 2010
Posts
1,004
Reaction score
1,862
Very true MA. As a generality (not commenting on Skate's backtest specifically), many of us initially think below 40% win rate is palatable, but is actually pretty "miserable" lot of the time over the long run. Doable, but lots more discipline and gumption required in the long run.

Must confess I personally watch % winners closely in backtests, but will have to keep a better eye on the "consecutive win" or loss parameters during backtesting.
People’s personal approach will often dictate what system metrics are important to them. For me personally my day-to-day approach to trading is not particularly sensitive to overall win/loss %. By that I mean the win/loss % doesn’t mess with my head when it comes to the challenges of getting up every day and placing my trades day in day out. However, what really does mess with my head is the consecutive number of winning or losing trades—I find it really tough to place a long sequence of losing trades no matter how well I know the system. So I tend to only live trade systems that have a much greater number of consecutive winning trades than losing trades. Whether a system has 40%, 50% or 60% overall winning trades doesn’t really bother me too much.
 
Top