Digital ACSTrend - page 35

 
MadCow:
SSA as a block transform may be used as a filter. In this format it repaints back about 10-15 bars depending on the parameters chosen. If the end point is captured and plotted, it will not repaint, but it will not show the same values as the repainted SSA. IMHO, the end point can be closely approximated by the T3 filter ( and probably by Jurik of some type). It is not clear that the end pointed SSA is any better than T3. It may be slightly smoother for the same lag, but that's not clear. Here is an MQH library that implements fastsingular in MQ4 code. It can be used instead of the DLL, and should work in an EA if you really want to try.

interesting MC. Its interesting you question the usefulness of SSA - for the manual users still fairly useful. For us autobots its rather annoying to have something doing we have not programmed and have little or no control over.

i will play with this and come back to you.

edit: funnily enough - i was playing with t3 today. I have set it up in a ma crossover fashion... out of interest how could the t3 approximate ssa in a cycle fashion? macd t3 hasnt got to be far off as a base in similarities?

thanks in particular to john last, mladen, new digital and anyone on this epic ride.

 
francisfinley:
interesting MC. Its interesting you question the usefulness of SSA - for the manual users still fairly useful. For us autobots its rather annoying to have something doing we have not programmed and have little or no control over.

i will play with this and come back to you.

edit: funnily enough - i was playing with t3 today. I have set it up in a ma crossover fashion... out of interest how could the t3 approximate ssa in a cycle fashion? macd t3 hasnt got to be far off as a base in similarities?

thanks in particular to john last, mladen, new digital and anyone on this epic ride.

It is useful to manual users because they ignore the repainting, or they use an endpointed version. If you write an indicator that displays the SSA calculated at time t, and then recalculates for time t+n and displays overlaid on the first curve you will see repainting back for many bars. What is worse is that the point at which the slope changes from + to - will move by as many as 2 or 3 bars. So if you are manually trading using the slope change of the SSA, you have a problem unless you use the endpointed SSA which does not repaint by definition. IMHO you can adjust a T3 filter to provide an indication of slope change just as well as an endpointed SSA.

Write an indicator that low-pass filters the price using an end pointed SSA and displays on the price curve. (An SSA low-pass filter uses the first N eigenvectors, includiong the 0th). The result is a line that will remove noise just like an MA or T3 or other low-pass digital filter. Overlay a T3 or Jurik filter on that and compare smoothness and lag. You will have to adjust the T3 or Jurik parameters, but you will find that you can make the adjustment so that the filters are very much alike in terms of both smoothness and lag. You must use an endpointed SSA, but that is required in an EA in any case. I have written several such filters, and will post one if I can find and test it.

If you agree that the end pointed SSA is no better than a T3, then it makes sense to use the T3 in your EA because it is so much easier to calculate.

IMHO if an EA requires exactly one type of digital filter, with precisely one set of parameters, then the EA is not robust enough to trade. Sooner or later Poof!

 

Question: to write a new one or not write a new one?

MadCow:
It is useful to manual users because they ignore the repainting, or they use an endpointed version. If you write an indicator that displays the SSA calculated at time t, and then recalculates for time t+n and displays overlaid on the first curve you will see repainting back for many bars. What is worse is that the point at which the slope changes from + to - will move by as many as 2 or 3 bars. So if you are manually trading using the slope change of the SSA, you have a problem unless you use the endpointed SSA which does not repaint by definition. IMHO you can adjust a T3 filter to provide an indication of slope change just as well as an endpointed SSA.

Write an indicator that low-pass filters the price using an end pointed SSA and displays on the price curve. (An SSA low-pass filter uses the first N eigenvectors, includiong the 0th). The result is a line that will remove noise just like an MA or T3 or other low-pass digital filter. Overlay a T3 or Jurik filter on that and compare smoothness and lag. You will have to adjust the T3 or Jurik parameters, but you will find that you can make the adjustment so that the filters are very much alike in terms of both smoothness and lag. You must use an endpointed SSA, but that is required in an EA in any case. I have written several such filters, and will post one if I can find and test it.

If you agree that the end pointed SSA is no better than a T3, then it makes sense to use the T3 in your EA because it is so much easier to calculate.

IMHO if an EA requires exactly one type of digital filter, with precisely one set of parameters, then the EA is not robust enough to trade. Sooner or later Poof!

Hi

Is there anyone who has written a SSA ep non repainting version ?

or should I write a release (w/ first N eigenvectors, excluding the 0th and may be the 1th) ??

or is this kind of version exists only for people from Elite section ??

rgds

johnyves

 
To repeat

SSA ep does not repaint. SSA recalculates, SSA ep does not (since it is using only windowed data it can not recalculate since it is completely unaware of the rest of the data - future or past data older than the window size, does not matter, all it can "see" is one segment of data extracted from the overall data and it never, but never can "see" any future data for any calculation point- that is quite clear even from the mql source)

________________________________

As of similarity of end pointed SSA and T3 : completely wrong. Any short period calculating moving average or filter is going to be similar to another short period calculating moving average or filter. Short jurik is going to look like short sma in right conditions. If you take a closer look at klots source code (that is around for a long time, so there was enough time for everybody to study it - my calculation is a bit different, but not even the elite section members have the source of the latest version of the SSA library) you will find out that it is much more similar to one much more known moving average - and once when you eliminate the "right side" of the data from SSA calculation (as it is done in the ep version by "windowing" it) then almost (but only almost, since the difference is big enough not to call it that way) almost pure LWMA is left as a result

I hope this will help in less guessing. So no repainting and LWMA as the next of kin. But please, do write a new end pointed non repainting one. I am eager to see in what the difference will be

regards

Mladen
 
mladen:
To repeat

SSA ep does not repaint. SSA recalculates, SSA ep does not (since it is using only windowed data it can not recalculate since it is completely unaware of the rest of the data - future or past data older than the window size, does not matter, all it can "see" is one segment of data extracted from the overall data and it never, but never can "see" any future data for any calculation point- that is quite clear even from the mql source)

________________________________

As of similarity of end pointed SSA and T3 : completely wrong. Any short period calculating moving average or filter is going to be similar to another short period calculating moving average or filter. Short jurik is going to look like short sma in right conditions. If you take a closer look at klots source code (that is around for a long time, so there was enough time for everybody to study it - my calculation is a bit different, but not even the elite section members have the source of the latest version of the SSA library) you will find out that it is much more similar to one much more known moving average - and once when you eliminate the "right side" of the data from SSA calculation (as it is done in the ep version by "windowing" it) then almost (but only almost, since the difference is big enough not to call it that way) almost pure LWMA is left as a result

I hope this will help in less guessing. So no repainting and LWMA as the next of kin. But please, do write a new end pointed non repainting one. I am eager to see in what the difference will be

regards

Mladen

Mladen I appreciate your ssa_ep code, and do not wish to challenge on the similarity of digital filters. I understand that the end-pointed SSA is causal. It recalculates the SSA at the end of each bar and plots only the last point. It does not repaint. I was just trying to provide a library that could be used instead of the SSA dll in an EA. I have had no success getting the SSA DLL to work in an EA, but the library I posted does work. Clearly, I did not write the library, but found it in these or other forums, and take no credit for it.

Any SSA filters that I have written use the same approach as yours, but simply call the mqh library instead of the DLL. Makes them slower, but I can modify the components in the library and make bandpass filters if I wish. I cannot do that with the DLL.

As to the quality of filters, here's an image of four.

Lavender = SSA_ep

Yellow = T3

White = WLMA

Aqua = Smoothed SSA (bandpass with median price added back instead of eigenvector 0)

It appears that the SSA overshoots on peaks like many Jurick filters. The T3 and WLMA follow the price better, with the T3 being marginally smoother. The SSA is marginally smoother than the T3.

One could also argue how many angels can dance on the head of a pin. The choice of filter is not as important as how you use the results. You can diddle the parameters for a year but get improvement only when you shift paradigms.

Files:
 

MadCow

As of how that dll can be called from an EA (if you need a direct access) : attaching an example (all it additionally needs is the dll itself) which calculates the end point SSA for a chosen bar, end point SSA for a bar previous to a chosen bar and is showing that, along with a slope calculated that way as a simple comment. So this example is an example of calls to libssa.dll directly without a need for any indicator

As of "One could also argue how many angels can dance on the head of a pin." : I always thought that it solely depends on how much do we want them there and do we need them there at all

Wish you a pleasant weekend regards

Mladen

Files:
 
mladen:
MadCow

As of how that dll can be called from an EA (if you need a direct access) : attaching an example (all it additionally needs is the dll itself) which calculates the end point SSA for a chosen bar, end point SSA for a bar previous to a chosen bar and is showing that, along with a slope calculated that way as a simple comment. So this example is an example of calls to libssa.dll directly without a need for any indicator

As of "One could also argue how many angels can dance on the head of a pin." : I always thought that it solely depends on how much do we want them there and do we need them there at all

Wish you a pleasant weekend

regards

Mladen

Thanks for the example. Love your sense of humor

 

iVAR Optimized

I'm posting a slightly optimized version of iVAR. The changes move constant value calculations from the start function into the init function to reduce calculations during a new pip. I have found my computer keyboard response is severely degraded when using iVAR.

One additional change I am thinking about is to do the calculations only on a bar change rather than pip by pip to minimize the response impact. What do you think?

Cheers

Files:
 

Daily ASCTrend system with FX options: maybe

As my test results showed that the daily time frame is really optimal for the system, I was thinking that we can use forex options to deal with that instead of spot positions.

By now two scenarios.

1. We can use a carry trade

If we can use a carry trade we open a Spot position in the direction of the daily signal.

We do not use stop loss order but we cover the position with a Forex option

This option would serve as an insurance. The benefit is that we do not use a stop loss order and we have time. For example there are a lot of speculative nasty short term reversals. We a protected against that, really I do not trust the ASCTrend stop loss dots, it is too much on a daily frame (The brain trend variation of the dots is better for confirmation of the signal but it does not look like the best place to place stops). With an option you have a value for money. With an option we can stay in the market in very nasty adverse reversals, because the spot position can stay opened, because it is protected by the option.

a. If we enter a long spot position we cover with a long put option (protective put strategy)

b. If we enter a short spot position we cover with a long call option

2. We cannot use carry trade

In this case it is even not necessary to use a spot position, because we are loosing value every day. This loss of value can be better used to cover part of the price of the premium of the option.

And you will not block money in your account because you will use leverage only for the price of the option and not for the price of the spot position.

a. We have a long daily ASCtrend we use a long call

b. We have a short ASCtrend we use a long put

Unfortunately the summer period is not very good, I expect to start with this strategy in September.

If you are not familiar with options you can use the resources in investopedia they are very friendly. There is a lot more on this for example you need some knowledge in order to know how to choose the option you need. All experienced opinions are welcome.

 

FX options issue

John Last:
As my test results showed that the daily time frame is really optimal for the system, I was thinking that we can use forex options to deal with that instead of spot positions.

By now two scenarios.

1. We can use a carry trade

If we can use a carry trade we open a Spot position in the direction of the daily signal.

We do not use stop loss order but we cover the position with a Forex option

This option would serve as an insurance. The benefit is that we do not use a stop loss order and we have time. For example there are a lot of speculative nasty short term reversals. We a protected against that, really I do not trust the ASCTrend stop loss dots, it is too much on a daily frame (The brain trend variation of the dots is better for confirmation of the signal but it does not look like the best place to place stops). With an option you have a value for money. With an option we can stay in the market in very nasty adverse reversals, because the spot position can stay opened, because it is protected by the option.

a. If we enter a long spot position we cover with a long put option (protective put strategy)

b. If we enter a short spot position we cover with a long call option

2. We cannot use carry trade

In this case it is even not necessary to use a spot position, because we are loosing value every day. This loss of value can be better used to cover part of the price of the premium of the option.

And you will not block money in your account because you will use leverage only for the price of the option and not for the price of the spot position.

a. We have a long daily ASCtrend we use a long call

b. We have a short ASCtrend we use a long put

Unfortunately the summer period is not very good, I expect to start with this strategy in September.

If you are not familiar with options you can use the resources in investopedia they are very friendly. There is a lot more on this for example you need some knowledge in order to know how to choose the option you need. All experienced opinions are welcome.

First and foremost John,

Trading options (as you know) reguries tow basic things that needs to be defined

1) Price (the anticipation of it)

2) Time (in which the anticipation of the price will happen)

Anyway, with the ASCTrend we got the answer for the first one. Let's say that system tells to buy. But what about the time aspect in which that action will take place. The case with options is more complex because of the time, rather than trading on CFD's. Another important thing is that the structure of price movement which is pivotal for a successful options trading. (the options valuation is largely based on the volatility of the trend)

In general I think that adopting this system to options is a way different thing than just buying call or put options depending on the system signal.

Reason: