Australian (ASX) Stock Market Forum

System Signal Generation?

Joined
14 April 2007
Posts
317
Reactions
0
Hello All,

Can I ask how others actually know when buy/sell signals are offered by their particular Systems?

For example:

(i) do you manually carry out Daily/Weekly searches (based on the criteria of your system requirements) using your charting software to arrive at a list of trading candidates?

(ii) Are you automatically presented with a list of buy/sell recommendations through some form of charting / trading software?

(ii) do you manunally "Eye-ball" the charts looking for particular signals (I'm sure this option is not suitable but I thought I'd include it anyway)


Additionally, with regard to position sizing and money management, can I ask how these two elements are calculated & controlled?

ie. Is a spreadsheet used to control this part of the system, or are these elements embedded / coded into the same software that produces the signals??


Just interested....

Many Thanks,

Chorlton
 
(i) do you manually carry out Daily/Weekly searches (based on the criteria of your system requirements) using your charting software to arrive at a list of trading candidates?

Im not trading my system at the moment (Im far from done testing and designing it), but when i do i will be running daily scans.

Additionally, with regard to position sizing and money management, can I ask how these two elements are calculated & controlled?

I'll be using Stator to do this.
 
I do a scan every night and weekend. I do check out the company abit in Commsec before trading to see if some unusual activity is taking place say a takeover etc.

I believe the most popular techniques for money management for stocks are fixed percent risk and fixed percent volatility.

The former is easy to calculate (however you may need to decide whether or not to include open profit) and the latter can be programmed as well, to give an indication of position size based on the last price ... and then the stop may be adjusted accordingly to the actual buy price if using broker placed conditional stops for exits once the trade is made.

There have been some posts (which you may need to go looking for on the metastock mailing list) on how to program this, or you can create one yourself.
 
Not sure if you saw this video Chorlton:

Chartist System Portfolio



Below are some screen shots from current action in my Signal Service which is a swing trading system. Both of these portfolio's are 100% automated, including position sizing.

Current Open Positions


199747a.png


Action Required Today

199747b.png
 
Hi Chorlton,

I run a daily scan (using MetaStock) on the systems that i'm currently trading.

Those securities that pass the system criteria can then be printed out in a report which includes the details I require and are thus coded into the MetaStock Explorer.

For ease of placing buy/sell orders and contingent orders the reports include the the following information:-

a) Limit Buy or Limit Sell Price,
b) Number of Shares (based on a combination of % Risk and Max. Position Size),
c) Risk per Share (Contingent order re Fixed Stop),
d) Profit Stop for intra-day exit (Physical or Contingent order),
e) Volatility (For ranking if required) and
f) Turnover.

Armed with the report I then check on the companies latest reports (eg. takeovers).

Unfortunately I do find myself "eye-balling" the charts of the securites listed in the reports to see how they have performed previously using the same system.
The "eye-balling" is very quick though as I use a template based on the system scanned.

The areas covered in the last two paragraphs are not part of the systems traded!!
 
I can't see why the choice of the Position Size Model in TradeSim would exclude open profit.
 
Opps, correction in my last post, as I was referencing the old manual, when I have the newer software installed ... which has additional position size models, I meant Equal Percent Dollar Risk as opposed to fixed percent risk .

For Percent Dollar Risk the manuals states,

"For example if this parameter is set to 10% and our initial trading capital is $50,000 then we would allocate $5,000 to any new trades irrespective of any existing trade positions that have already been taken."

I read this to mean that we ignoring open profit.

Cool about the new position sizing models ... I'll have to do some testing this weekend.
 
Firstly, Let me say Thanks to everyone who replied... :) My current idea was to use a combination of Metastock for identifying the trades and excel for the money management side of things.

However, I like the approach taken by Nick Radge. The idea of being able to control all elements of a system in one place is def appealing but given the price tag associated with Tradestation, I don't think this is an option for me!


Hi Chorlton,

I run a daily scan (using MetaStock) on the systems that i'm currently trading.

Those securities that pass the system criteria can then be printed out in a report which includes the details I require and are thus coded into the MetaStock Explorer.

For ease of placing buy/sell orders and contingent orders the reports include the the following information:-

a) Limit Buy or Limit Sell Price,
b) Number of Shares (based on a combination of % Risk and Max. Position Size),
c) Risk per Share (Contingent order re Fixed Stop),
d) Profit Stop for intra-day exit (Physical or Contingent order),
e) Volatility (For ranking if required) and
f) Turnover.

rnr,

Can I ask how you include the above in a Metastock report, as I would like to explore the idea of doing something similar.


Many Thanks,

Chorlton
 
Originally posted by Chorlton
Can I ask how you include the above in a Metastock report, as I would like to explore the idea of doing something similar.

Chorlton,

I thought the easiest way to cover this was to look at an example system.

The example system I have used is based on tech/a's TechTrader but with some changes to the

entry and fixed stop rules so that they are more difficult to calculate mentally.


Revised T/T Example System (code not checked for back-testing):

EntryRule:=
CLOSE+0.25*ATR(5);

EntryTrigger:=
BarsSince(Cross(H,Ref(HHV(H,10),-1)))=0 AND
HHVBars(H,70)=0 AND C>O AND C<10.00 ANDH>Mov(C,40,E) AND Mov(V*C,21,S)>200000 AND
Ref(H,1)=EntryRule;

EntryPrice:=
If(OPEN=Ref(EntryRule,-1),OPEN,Ref(EntryRule,-1));

InitialStop:=
EntryPrice-6*Ref(ATR(10),-1);

ProfitStop:=
Ref(Mov(L,180,E),-1);

ExitTrigger:=
LOW<Ref(Mov(L,180,E),-1); {Intra-day exit}

ExitPrice:=
Ref(ProfitStop,-1)-0.01;


OtherDetails:

Original Capital = $100,000
Fixed % Risk = 2% of Original Capital = $2,000
Max. Position Size = 10% of Original Capital = $10,000


MetaStock Explorer
Name:TTC
ColumnA
Col. Name:M/M Buy {Description depends on your LONG or SHORT EntryRule}
Code:
CLOSE+0.25*ATR(5); {Minimum/Maximum BUY price}

ColumnB
Col. Name:# Shares {Based on a combination of % Risk and Max. Position Size}
Code:
ER:=CLOSE+0.25*ATR(5); {EntryRule}
DR:=6*ATR(10); {$ Risk}
PRV:=2000; {% Risk Value}
MPS:=14500; {Maximum Position Size}
No.Shares:=If((PRV/DR)*ER>MPS,MPS/ER,PRV/DR);
No.Shares;

ColumnC
Col. Name:Fixed-S {Fixed-S or $ Risk depending on the system}
Code:
CLOSE-6*ATR(10);

ColumnD
Col. Name:profit-S
Code:
Mov(L,180,E);

ColumnE
Col. Name:Vol-Rank
Code:
(ATR(30)/CLOSE)*100;

ColumnF
Col. Name:Turnover
Code:
Mov(V*C,21,S);

Filter
Code:
BarsSince(Cross(H,Ref(HHV(H,10),-1)))=0 AND
HHVBars(H,70)=0 AND C>O AND C<10.00 ANDH>Mov(C,40,E) AND Mov(V*C,21,S)>200000;

As far as I can see I haven't missed anything!!
 
Originally posted by Chorlton


Chorlton,

I thought the easiest way to cover this was to look at an example system.

The example system I have used is based on tech/a's TechTrader but with some changes to the

entry and fixed stop rules so that they are more difficult to calculate mentally.


Revised T/T Example System (code not checked for back-testing):

EntryRule:=
CLOSE+0.25*ATR(5);

EntryTrigger:=
BarsSince(Cross(H,Ref(HHV(H,10),-1)))=0 AND
HHVBars(H,70)=0 AND C>O AND C<10.00 ANDH>Mov(C,40,E) AND Mov(V*C,21,S)>200000 AND
Ref(H,1)=EntryRule;

EntryPrice:=
If(OPEN=Ref(EntryRule,-1),OPEN,Ref(EntryRule,-1));

InitialStop:=
EntryPrice-6*Ref(ATR(10),-1);

ProfitStop:=
Ref(Mov(L,180,E),-1);

ExitTrigger:=
LOW<Ref(Mov(L,180,E),-1); {Intra-day exit}

ExitPrice:=
Ref(ProfitStop,-1)-0.01;


OtherDetails:

Original Capital = $100,000
Fixed % Risk = 2% of Original Capital = $2,000
Max. Position Size = 10% of Original Capital = $10,000


MetaStock Explorer
Name:TTC
ColumnA
Col. Name:M/M Buy {Description depends on your LONG or SHORT EntryRule}
Code:
CLOSE+0.25*ATR(5); {Minimum/Maximum BUY price}

ColumnB
Col. Name:# Shares {Based on a combination of % Risk and Max. Position Size}
Code:
ER:=CLOSE+0.25*ATR(5); {EntryRule}
DR:=6*ATR(10); {$ Risk}
PRV:=2000; {% Risk Value}
MPS:=14500; {Maximum Position Size}
No.Shares:=If((PRV/DR)*ER>MPS,MPS/ER,PRV/DR);
No.Shares;

ColumnC
Col. Name:Fixed-S {Fixed-S or $ Risk depending on the system}
Code:
CLOSE-6*ATR(10);

ColumnD
Col. Name:profit-S
Code:
Mov(L,180,E);

ColumnE
Col. Name:Vol-Rank
Code:
(ATR(30)/CLOSE)*100;

ColumnF
Col. Name:Turnover
Code:
Mov(V*C,21,S);

Filter
Code:
BarsSince(Cross(H,Ref(HHV(H,10),-1)))=0 AND
HHVBars(H,70)=0 AND C>O AND C<10.00 ANDH>Mov(C,40,E) AND Mov(V*C,21,S)>200000;

As far as I can see I haven't missed anything!!

rnr,

Thanks for taking the time to reply. Would it be possible to explain in laymans terms each of the columns, just so that I have understood their content correctly?

I've noticed in the column marked #Shares for example that you have actually defined the %RV and Max Pos Size values and as these seem to be fixed values, they are therefore not based on the current running Total of Capital?

Ideally, in my situation I would have liked to base these values on my current running Capital Total so that as my capital increases so does my % Risk and obviously vice versa when my running capital is less.

I'm assuming though that this is probably not going to be possible though... :confused:

Chorlton
 
Chorlton, you can do alot of these things with metastock with abit of playing around ... you could create an indictator which contains your current capital, and then reference this indictator as a external formula in all your other calculations (within explorer or referenced within other indicators plotted as part of a template etc). I use something like this with one of my systems.

You will need to update the value of the 'current capital' indicator though. I would suggest using a portfolio management software like StatorAFM or excel to keep track of this value.

You could perhaps create some code that does keep track of all your open positions, and total trading capital ... may be abit messy ... I prefer using specific tools for this purpose.
 
Thanks Weird...

Unfortunately, my MS skills are very limited!!! I can write a basic exploration but thats about it at the moment..... :banghead:

There's so much to learn at the moment with regard to System Development. MS language, TradeSim, etc etc.... :eek:

Anyway, can I ask what software you would use for tracking the Money Management side of things???

Cheers,

Chorlton
 
Personally Stator AFM , but there are lots of other software which I have seen from threads concerning this topic that other traders are more than happy with, which include excel ... prices are usually updated from yahoo. I would recommend doing a search on this topic.

For position sizing I personally don't include open profits.
 
Chorlton,

Before attempting your request I will make a comment on Fixed % Risk and Position Size.
When back-testing a system I never allow for the pyramiding of profits.
The sole reason for this decision being that I may eventually trade this system as a means of earning an income and therefore would not be able to re-invest the profits.

ColumnA - (Entry Price)
The example entry price is todays CLOSE plus 1/4 of todays value of the 5 day Average True Range indicator (CLOSE+0.25*ATR(5)).
There is, of course, a possability that one is unable to take a position in this trade if the high of tomorrow does not reach the entry price.
If the system EntryRule was the OPEN of tomorrow you obviously couldn't code that in for todays scan.

ColumnB - (Position Size)
Given your comments I will take it that you understand the code and the expectant results and I also acknowledge that weird has commented on an alternative approach to the one I have mentioned.
My comments at the beginning of this post may also give you a clue as to why I coded the example this way.

ColumnC - (Fixed or Initial Stop)
The Entry Price (CLOSE+0.25*ATR(5)) as detailed for ColumnA less 6 times todays value of the 10 day Average True Range indicator (-6*ATR(10)).
By now you will have worked out that I made a mistake in post # 11 and the code for ColumnC should read (CLOSE+0.25*ATR(5))-6*ATR(10) .
If the system specifies an exact Entry Price then the Fixed Stop can be calculated on the scan day, however, if the EntryRule was the OPEN of tomorrow then we would only use ColumnC to calculate the $Risk figure which is to be deducted from the OPEN of tomorrow (i.e. 6 times todays value of the 10 day Average True Range indicator) to arrive at the Fixed Stop.

ColumnD - (Profit Stop - Trailing Stop)
The profit stop in this example has been coded as an intra-day exit and is based on the value of an Exponential Moving Average (EMA) of the LOW over the last 180 days (Mov(L,180,E)).
The exit will be triggered if todays price falls below yesterdays value of Mov(L,180,E).

ColumnE - (Volatility Ranking - see Adaptive Analysis by Nick Radge)
If your system produced, for example, 4 possible trades for tomorrow, however, you only have enough free capital to enter one trade you could choose the share with the highest volatility ranking.
The volatility is calculated using todays value of the 30 day Average True Range indicator divided by the CLOSE of today. This result is multiplied by 100 to obtain a percentage result ((ATR(30)/CLOSE)*100).

ColumnF - (Turnover)
Even though there is a turnover filter in the EntryTrigger I find it helpful to know the turnover value for each position. If the turnover value is very close to my filter value I may do a quick check to see that the volume of shares traded in the last week has not jumped extraordinarily high.
The turnover value is calculated using a 21 day Simple Moving Average of the CLOSE muliplied by the VOLUME for each day (Mov(V*C,21,S)).

Hopefully this covers all the details you requested.
 
ColumnA - (Entry Price)
The example entry price is todays CLOSE plus 1/4 of todays value of the 5 day Average True Range indicator (CLOSE+0.25*ATR(5)).
There is, of course, a possability that one is unable to take a position in this trade if the high of tomorrow does not reach the entry price.
If the system EntryRule was the OPEN of tomorrow you obviously couldn't code that in for todays scan.

Hi RNR,

I dont quite understand this entry price requirement.
What is the advantage of this exactly as opposed to buying the next day OPEN when the EntryTrigger requirements are met?
Is it to avoid those stocks that gap down?
And to buy the stocks that "gap up" on the next open by 0.25*ATR?
How about if they gap up by more than 0.25*ATR?

Any clarifications would be much appreciated.
 
Nizar,

The example I chose was purely to demonstrate Chorlton's question and show that all the

information he required (with the exception of risk/position size) could be incorporated in

a report available after conducting an exploration in MetaStock although I did want the BUY

price to be higher than the close of the EntryTrigger day.

As I recall, from other questions you have raised on ASF, the coding for both of those

systems (TechTrader & Turtle Breakout) specify "BUY at OPEN on the day after the

EntryTrigger has been satisfied".

Okay, that's easy to come to grips with (they are both LONG trend following systems) but,

as yet you probably haven't explored the many alternate entry rules to see how they affect

either of these systems!

Why not try a few different entry rules and see how they impact on the win/loss ratio, the

number of trades terminated by triggering the Fixed Stop, the length of time in losing

trades and perhaps the drawdown percentages.

It is also worth remembering that there are other alternatives to long trend following

systems that may require totally different entry strategies.

I'm more than happy to come up with a few coded alternatives but, for the sake of

expediency, would suggest you PM me your current coding for the two systems in question.
 
Chorlton,

Before attempting your request I will make a comment on Fixed % Risk and Position Size.
When back-testing a system I never allow for the pyramiding of profits.
The sole reason for this decision being that I may eventually trade this system as a means of earning an income and therefore would not be able to re-invest the profits.

ColumnA - (Entry Price)
The example entry price is todays CLOSE plus 1/4 of todays value of the 5 day Average True Range indicator (CLOSE+0.25*ATR(5)).
There is, of course, a possability that one is unable to take a position in this trade if the high of tomorrow does not reach the entry price.
If the system EntryRule was the OPEN of tomorrow you obviously couldn't code that in for todays scan.

ColumnB - (Position Size)
Given your comments I will take it that you understand the code and the expectant results and I also acknowledge that weird has commented on an alternative approach to the one I have mentioned.
My comments at the beginning of this post may also give you a clue as to why I coded the example this way.

ColumnC - (Fixed or Initial Stop)
The Entry Price (CLOSE+0.25*ATR(5)) as detailed for ColumnA less 6 times todays value of the 10 day Average True Range indicator (-6*ATR(10)).
By now you will have worked out that I made a mistake in post # 11 and the code for ColumnC should read (CLOSE+0.25*ATR(5))-6*ATR(10) .
If the system specifies an exact Entry Price then the Fixed Stop can be calculated on the scan day, however, if the EntryRule was the OPEN of tomorrow then we would only use ColumnC to calculate the $Risk figure which is to be deducted from the OPEN of tomorrow (i.e. 6 times todays value of the 10 day Average True Range indicator) to arrive at the Fixed Stop.

ColumnD - (Profit Stop - Trailing Stop)
The profit stop in this example has been coded as an intra-day exit and is based on the value of an Exponential Moving Average (EMA) of the LOW over the last 180 days (Mov(L,180,E)).
The exit will be triggered if todays price falls below yesterdays value of Mov(L,180,E).

ColumnE - (Volatility Ranking - see Adaptive Analysis by Nick Radge)
If your system produced, for example, 4 possible trades for tomorrow, however, you only have enough free capital to enter one trade you could choose the share with the highest volatility ranking.
The volatility is calculated using todays value of the 30 day Average True Range indicator divided by the CLOSE of today. This result is multiplied by 100 to obtain a percentage result ((ATR(30)/CLOSE)*100).

ColumnF - (Turnover)
Even though there is a turnover filter in the EntryTrigger I find it helpful to know the turnover value for each position. If the turnover value is very close to my filter value I may do a quick check to see that the volume of shares traded in the last week has not jumped extraordinarily high.
The turnover value is calculated using a 21 day Simple Moving Average of the CLOSE muliplied by the VOLUME for each day (Mov(V*C,21,S)).

Hopefully this covers all the details you requested.



Thanks rnr for the time to respond in so much detail.... Its much appreciated....
 
Top