This article will deal with the development of a fully automatic (self-optimizing) system. We will not post any proprietary code but we will post samples if available based on what is now in public domain.
To start. There are 4 areas (in our opinion) that must be addressed
1st. What will trigger the entries and how often?
2nd. What will keep us in trade and prevent from unnecessary swings.
3rd. What will be the exit policy and why.
4th. What will be re-entry policy if trend continues.
In this post we will start triggers for entries. and keep developing as the time allows.
First thing is to realize what is suitable system to drive the averages, channels and oscillators and how.
Best system can be categorized as those based on averages. Problem is that longer the average, smoother it is but also less profitable system will be specially in sideways channels. Therefore logical alternative is to use average that is reasonable fast responding and quite smooth. Second issue is that such average needs a longer filter to be able to extricate just in trend trades. Since there really is not such average or combination, we must construct one.
Nice would be to have a 3 time frame average, but problem is that highest time frame average will be behind times. Lets assume that we plot 3 linear regression lines based on High. One with length of 3, second with length of 6 and third with length of 18. These 3 linear regression lines will intercept and create a triangle shaped area on the chart. Repeat the same with Low. These areas will have a "Center of Gravity" which we can use to plot a curve. This will be our average that satisfies all 3 time frames. Now add these two averages and divide by two and you have the resultant average. This is if one paints a rigid average. Now lets do the same but use some sort of automatic length algorithm. There are several publicly available. For simplicity use "Hilbert" that was posted in various other threads.
Now we need a confirmation of the direction. For this we can easily use the oscillator. Double smoothed stochastic was posted in several threads, (we like using PFE of momentum). These are extreme zones indicators and are suitable for giving sufficient early warning as to new trend change.
Final part of the entry decisions is a some sort of the channel break out. This should be independent of the average that we use. For simplicity, one should look at confirmation by volume, since volume usually lead the action of the market and it is quite easily spotted. Somewhere on this forum there was posted Volume Weighted Average. This average when based on High and Low will form suitable channel. In our own analysis we use our own auto ave pro version.
We will continue in the next post tomorrow.
Now that we have decided to use a program that automatically adjusts the length, we have a problem. This program (possibly Hilbert) puts out only one length. This can be overcome bys assuming that the longest length is equal to 18, which is what we have arbitrarily selected. We know the ratio of 3, 6 and 18 and therefore apply inverse of this ratio to output from Hilbert. This will give us 3 lengths. We have also decided that part of our confirmation will be the oscillator. In order to have stronger confirmation from oscillators, we will also need an oscillator that is based on volume. For this purpose, the stochastic of the RSI should be used, where input into stochastic is volume. Again we have similar task of coming up with a multi-time oscillator. There were several articles published on MTF indicators. It would seem that about 8 years ago, Omega introduced a small formula that can simulate the multi time data without having second or third data stream on the chart, and this formula performs much better than any of the MTF schemes.
Formula looks like this.:
We now can simulate the data stream of higher time frame, therefore output of this formula can be used directly as a an input into the oscillator. When we have the three oscillators constructed (with one length of Hilbert) we need to achieve single oscillator. This cam easily be accomplished by taking geometric average between 1 and third oscillator and again this result and middle oscillator. We now have 3 oscillators that will change length according to the data and yet independent because of their construction. First is PFE of the Double Stochastic, Second is Stochastic of RSI based on volume and the final one is just plain PFE of the momentum based on length 52 and 23 of Weighted close.
To start. There are 4 areas (in our opinion) that must be addressed
1st. What will trigger the entries and how often?
2nd. What will keep us in trade and prevent from unnecessary swings.
3rd. What will be the exit policy and why.
4th. What will be re-entry policy if trend continues.
In this post we will start triggers for entries. and keep developing as the time allows.
First thing is to realize what is suitable system to drive the averages, channels and oscillators and how.
Best system can be categorized as those based on averages. Problem is that longer the average, smoother it is but also less profitable system will be specially in sideways channels. Therefore logical alternative is to use average that is reasonable fast responding and quite smooth. Second issue is that such average needs a longer filter to be able to extricate just in trend trades. Since there really is not such average or combination, we must construct one.
Nice would be to have a 3 time frame average, but problem is that highest time frame average will be behind times. Lets assume that we plot 3 linear regression lines based on High. One with length of 3, second with length of 6 and third with length of 18. These 3 linear regression lines will intercept and create a triangle shaped area on the chart. Repeat the same with Low. These areas will have a "Center of Gravity" which we can use to plot a curve. This will be our average that satisfies all 3 time frames. Now add these two averages and divide by two and you have the resultant average. This is if one paints a rigid average. Now lets do the same but use some sort of automatic length algorithm. There are several publicly available. For simplicity use "Hilbert" that was posted in various other threads.
Now we need a confirmation of the direction. For this we can easily use the oscillator. Double smoothed stochastic was posted in several threads, (we like using PFE of momentum). These are extreme zones indicators and are suitable for giving sufficient early warning as to new trend change.
Final part of the entry decisions is a some sort of the channel break out. This should be independent of the average that we use. For simplicity, one should look at confirmation by volume, since volume usually lead the action of the market and it is quite easily spotted. Somewhere on this forum there was posted Volume Weighted Average. This average when based on High and Low will form suitable channel. In our own analysis we use our own auto ave pro version.
We will continue in the next post tomorrow.
Now that we have decided to use a program that automatically adjusts the length, we have a problem. This program (possibly Hilbert) puts out only one length. This can be overcome bys assuming that the longest length is equal to 18, which is what we have arbitrarily selected. We know the ratio of 3, 6 and 18 and therefore apply inverse of this ratio to output from Hilbert. This will give us 3 lengths. We have also decided that part of our confirmation will be the oscillator. In order to have stronger confirmation from oscillators, we will also need an oscillator that is based on volume. For this purpose, the stochastic of the RSI should be used, where input into stochastic is volume. Again we have similar task of coming up with a multi-time oscillator. There were several articles published on MTF indicators. It would seem that about 8 years ago, Omega introduced a small formula that can simulate the multi time data without having second or third data stream on the chart, and this formula performs much better than any of the MTF schemes.
Formula looks like this.:
Code:
{
Study Name: CombineDays
Study Type: Indicator
Description: Combine a number of bars to produce a OHLC bar chart of those bars.
ie: Three bars OHLC bar chart
}
Inputs: NumDays(3); {Three bars)
IF FracPortion(CurrentBar / NumDays) = 0 Then Begin
Plot1(Open[NumDays -1],"Open");
Plot2(Highest(High,NumDays),"High");
Plot3(Lowest(Low,NumDays),"Low");
Plot4(Close[0],"Close");
END;
We now can simulate the data stream of higher time frame, therefore output of this formula can be used directly as a an input into the oscillator. When we have the three oscillators constructed (with one length of Hilbert) we need to achieve single oscillator. This cam easily be accomplished by taking geometric average between 1 and third oscillator and again this result and middle oscillator. We now have 3 oscillators that will change length according to the data and yet independent because of their construction. First is PFE of the Double Stochastic, Second is Stochastic of RSI based on volume and the final one is just plain PFE of the momentum based on length 52 and 23 of Weighted close.