Australian (ASX) Stock Market Forum

Dump it Here

@Skate I found an example of an afl that is using a CCIFast and CCISlow cross. May I ask if you are doing something similar, or something simpler than this?
Code:
CCISlow=Param("CCISlow",30,30,100,10);
CCIFast=Param("CCIFast",10,5,30,5);
Buy = Cross( CCI(CCIFast), 0 ) AND CCI(CCIFast) > CCI(CCISlow) ; // plus filters
Sell = Cross( 0,CCI(CCIFast)) AND CCI(CCIFast) < CCI(CCISlow);

Simple works
@dpong that is one of the many codes you can use. A simple moving average (SMA) cross is effective as a trading system & a (CCI) cross (IMHO) would be just as effective. Using the code you posted is a good start in researching if a (CCI) indicator can be turned into an effective system to trade. You can use that code for your buy & sell signals remembering that there is much more to a strategy than a signal generator.

Skate.
 
Hi, I am new to stocks. I was wondering if someone could help me please as clearly I don't understand a lot haha.

I am trading equities in U.S stocks on CMC markets, no international fees. I purchased 50 apple stocks @ $129.420 USD per stock = $6471 USD. However my profit and loss section says I paid net $169.42 AUD per share = $130.44 USD in currency conversion. I was expecting that any sale of shares above $129.420 USD would result in profit but this doesn't seem the case?

I've attached it so you can get a better idea of what i'm talking about.

Really appreciate any help! Thanks so much.

(Also if there is a more appropriate section with better visibility please let me know)

 

Attachments

  • Apple.PNG
    Apple.PNG
    15.1 KB · Views: 27
Hi, I am new to stocks. I was wondering if someone could help me please as clearly I don't understand a lot haha.

I am trading equities in U.S stocks on CMC markets, no international fees. I purchased 50 apple stocks @ $129.420 USD per stock = $6471 USD. However my profit and loss section says I paid net $169.42 AUD per share = $130.44 USD in currency conversion. I was expecting that any sale of shares above $129.420 USD would result in profit but this doesn't seem the case?

I've attached it so you can get a better idea of what i'm talking about.

Really appreciate any help! Thanks so much.

(Also if there is a more appropriate section with better visibility please let me know)

I would be looking at your FX rate and see if the changes in AUDUSD are affecting your profits.
 
So would this screen update as the FX rate updates? For example if I purchased at 0.772 and it is now 0.775.

Would you be able to explain how FX rates work briefly please? If i lock an order for a stock at $100 USD a stock and it is $1 USD to $1.25 AUD, but then by the time the order is executed, it has changed to $1.30 AUD, it means I will pay more than what I originally locked?

Is that right?
 
Share Trade Tracker update
It's a real shame that the development of STT has been halted. If anyone is interested in obtaining a copy of STT I suggest you send a request to support@xlautomation.com.au & mention you are a member of the Aussie Stock Forum.

XLAutomation consulting services
XLAutomation still provides consulting services to supply a copy of the Share Trade Tracker workbook. Their minimum consulting charge is 2 hours @ $140/hr (ex GST) & for that cost, you would receive a copy of the STT workbook & one serial key to activate the product. There is "No Support" offered as part of this charge. If in the future you do require support to enhance or fix an issue then this would incur further consulting service costs.

So here is the deal
Contact the email address support@xlautomation.com.au if you want to purchase this consulting service & receive a copy of Share Trade Tracker. (The total cost is $280 excluding GST)

Skate.
 
So would this screen update as the FX rate updates? For example if I purchased at 0.772 and it is now 0.775.

Would you be able to explain how FX rates work briefly please? If i lock an order for a stock at $100 USD a stock and it is $1 USD to $1.25 AUD, but then by the time the order is executed, it has changed to $1.30 AUD, it means I will pay more than what I originally locked?

Is that right?
I believe the screen would change as the FX changed.

Im not sure about the order. I imagine the actual price bought may change but this depends on how CMC route their intentional orders. Despite being a CMC customer, I have no idea. Either way, the value of your stock is obviously changed by changes in FX rate. You are an Australian citizen and trading from Australia so the value of your account will be in Aud. This is also why business and some more advanced investors/traders hedge currency to not be subjected to FX fluctuations.

Hope that helps mate.
 
I started on 13 February 2020 with my first non-discretionary trading strategy (I call it my 'Active Trading' strategy, as I dont have to be active) which is only a week or two off probably the worst time to start from a sequencing risk point of view. In saying that, I am comfortable around how and more importantly why it performed.

View attachment 118172

It too backs @Skate comment around give it some legs. It started buying back in early June, and time has given it some legs compared to just buying the market as a whole.

The return on this is probably far off, what some others in this thread achieved over that time, but I have been investing my time and resources into 2 small business operations and a young family, so system development is a part time/casual interest.

Sequencing Risk and Index Filters

There are a lot of fund managers and retirement product providers that are banging on about sequencing risk and why its important, understandably a retiree with all their super in a balanced fund retiring at the start of this year would have been drawing income out of their super in a falling market. Not good - but not an issue for me (mortgage and family wont let me retire for a while :oops: ).

I have put this sequencing risk into context of the index filter discussion, and think that the index filter is a crude method in alleviating this sequencing risk (effectively reducing draw down as per my system above when it flatlined).

More importantly I have also put some thinking into some of @Skate musings in this thread, some of @ducati916 insights and analysis of the markets and sectors over the last 6 months.

What have I learnt though
  • That when the proverbial hits the fan, there is unrelenting selling across the board
  • The market over the last 12 months has shown there are significant differences between sectors
  • That an index filter (XAO as an example) can be good at getting you out of the market, but can be slow getting you back in
  • That a filter based on a particular sector can be more appropriate than the broad index eg. XIJ as a filter for tech stocks would have had you back in much sooner


Hopefully food for thought, am I right, maybe or maybe not. I haven't been able to code something like that up yet, but have been loosely apply it to my discretionary trading with success.

I will figure something out.

In the meantime I will continue to use my crude index/vix based GTFO filter on my existing system until it no longer performs within my risk/return expectations and trade pattern
@WilsonFisk I found this https://decodingmarkets.com/simple-breakout-system-sector-filter/ Not quite what you wanted but may help. Also a bit more advanced is this http://www.amibroker.com/kb/2016/01...r-categories-that-can-be-used-in-backtesting/
 
@Skate I found an example of an afl that is using a CCIFast and CCISlow cross.

I have a new project
@dpong found a snippet on the internet for a CCI strategy. As a quick & dirty example I placed his buy signal into the "WTT strategy" that I constructed in 12 easy steps.

The original strategy
When you start coding you have to start somewhere. The uploaded (afl) is from (2015) it was one of my first attempts to code a strategy so I can't guarantee it's not without errors. If this is where "I started coding" it's a perfect place to start for others new to Amibroker.

Calling all members
I'll upload the first version (v1) of "dpong's CCI" strategy.

The challenge
Is it possible as a collective to develop a (CCI momentum indicator) into a half-decent trading strategy?

My version is (V1)
Someone needs to do a backtest on the first version (v1) of the "CCI Strategy" as a base. Let's use the period from 1st July 2020 to 30th December 2020. (the start of this financial year)

This is an opportunity for all to get involved
Involvement can be the way of (a) discussion or (b) a minor re-write of the strategy or (c) a complete re-code of the CCI Strategy.

Skate.
 

Attachments

  • Skate's Modified dpong CCI Weekly Strategy v1.afl
    11.3 KB · Views: 53
@investtrader thank you for taking an interest in the "CCI Strategy" & for quickly posting a backtest report.

We now have a base backtest
Development of the "CCI Strategy" will start from here.

Skate.
 
@investtrader thank you for taking an interest in the "CCI Strategy" & for quickly posting a backtest report.

We now have a base backtest
Development of the "CCI Strategy" will start from here.

Skate.

Is there an error with the index filter portion of the code? this is assuming that the intent of the index filter is to reference the XAO and not the MA of the individual symbol.

Should this:

//=================================================================================
//2. The "Index Filter" - decides when we will trade & also our trailing stop levels
//=================================================================================
MAfilter = MA( C, 10 ); // 10 week lookback period
IndexBuyFilter = C > MAfilter; // Index Filter = ON: When the close is greater than the 10 week simple moving average the Index Filter is ON [trailing stop set to 20%] + [buy + sell signals generated]
IndexSellFilter = C < MAfilter; // Index Filter = OFF: When the close is less than the 10 week simple moving average the Index Filter is OFF [shortens trailing stop to 10%] + [only sell signals generated]
//=================================================================================
//3. Add all our other filters



be this:

//=================================================================================
//2. The "Index Filter" - decides when we will trade & also our trailing stop levels
//=================================================================================
SetForeign( "$XAO.au", True , True ); // I've used the new Norgate Updater (NDU) format - change if the format is different to your data supplier
MAfilter = MA( C, 10 ); // 10 week lookback period
IndexBuyFilter = C > MAfilter; // Index Filter = ON: When the close is greater than the 10 week simple moving average the Index Filter is ON [trailing stop set to 20%] + [buy + sell signals generated]
IndexSellFilter = C < MAfilter; // Index Filter = OFF: When the close is less than the 10 week simple moving average the Index Filter is OFF [shortens trailing stop to 10%] + [only sell signals generated]
RestorePriceArrays( True ); // Restores original price and volume arrays after the call to SetForeign.
//=================================================================================
 
Is there an error with the index filter portion of the code? this is assuming that the intent of the index filter is to reference the XAO and not the MA of the individual symbol.

Should this:

//=================================================================================
//2. The "Index Filter" - decides when we will trade & also our trailing stop levels
//=================================================================================
MAfilter = MA( C, 10 ); // 10 week lookback period
IndexBuyFilter = C > MAfilter; // Index Filter = ON: When the close is greater than the 10 week simple moving average the Index Filter is ON [trailing stop set to 20%] + [buy + sell signals generated]
IndexSellFilter = C < MAfilter; // Index Filter = OFF: When the close is less than the 10 week simple moving average the Index Filter is OFF [shortens trailing stop to 10%] + [only sell signals generated]
//=================================================================================
//3. Add all our other filters



be this:

//=================================================================================
//2. The "Index Filter" - decides when we will trade & also our trailing stop levels
//=================================================================================
SetForeign( "$XAO.au", True , True ); // I've used the new Norgate Updater (NDU) format - change if the format is different to your data supplier
MAfilter = MA( C, 10 ); // 10 week lookback period
IndexBuyFilter = C > MAfilter; // Index Filter = ON: When the close is greater than the 10 week simple moving average the Index Filter is ON [trailing stop set to 20%] + [buy + sell signals generated]
IndexSellFilter = C < MAfilter; // Index Filter = OFF: When the close is less than the 10 week simple moving average the Index Filter is OFF [shortens trailing stop to 10%] + [only sell signals generated]
RestorePriceArrays( True ); // Restores original price and volume arrays after the call to SetForeign.
//=================================================================================

@stasisbr you can change the code to your heart's content (improvements can be found). When you have a version ready "upload your improved strategy" so others can test it "OR" further improve on it.

Important
So others can see your work - "comment" the changes you have made with (// stasisbr)

Skate.
 
XLAutomation consulting services
XLAutomation still provides consulting services to supply a copy of the Share Trade Tracker workbook. Their minimum consulting charge is 2 hours @ $140/hr (ex GST) & for that cost, you would receive a copy of the STT workbook & one serial key to activate the product. There is "No Support" offered as part of this charge. If in the future you do require support to enhance or fix an issue then this would incur further consulting service costs.


Skate.

Have you had many problems with the workbook in the past Skate? I'm interested in paying the one off, providing its not buggy as hell and I will have to contact them and pay for support each time I have an issue.

Cheers
 
Have you had many problems with the workbook in the past Skate? I'm interested in paying the one off, providing its not buggy as hell and I will have to contact them and pay for support each time I have an issue.

Cheers
@chips88, Share Trade Tracker is one piece of software I couldn’t live without. The software is perfect (IMHO).

Drop my name
When you email support - mention that you were referred by Skate, it can’t hurt.

Skate.
 
@stasisbr you can change the code to your heart's content (improvements can be found). When you have a version ready "upload your improved strategy" so others can test it "OR" further improve on it.

Important
So others can see your work - "comment" the changes you have made with (// stasisbr)

Skate.

Hi Skate,

That was my intent, but I'm curious to know more about investtrader's data setup as I get a different result for backtesting 1/07/2020 - 30/12/2020 using the code as provided. Perhaps someone else can also run a backtest so we have a wider sample.

Data Source is Norgate Platinum, however the code doesn't use the norgate specific functions,
Date range is 1/07/202 - 30/12/2020
Watchlist is All Ords Current only and it has 497 symbols in it.
Pad and Align is on and using XAO.au
Timeframe is weekly


InvestTrader BacktestStasisbr Backtest
1610447122783.png1610447107432.png
 
That was my intent, but I'm curious to know more about investtrader's data setup as I get a different result for backtesting 1/07/2020 - 30/12/2020 using the code as provided. Perhaps someone else can also run a backtest so we have a wider sample.

Data Source is Norgate Platinum, however the code doesn't use the norgate specific functions,
Date range is 1/07/202 - 30/12/2020
Watchlist is All Ords Current only and it has 497 symbols in it.
Pad and Align is on and using XAO.au
Timeframe is weekly

@stasisbr, good suggestion - let's wait for another backtest to get our baseline

Data Source: Norgate Platinum
Date range: 1/07/2020 - 30/12/2020
Watchlist: All Ords Current & Past
Pad and Align: using XAO.au
Timeframe: Weekly

Skate.
 
Top