Newbie Filters - How to Advance Filter?

 

Nice Article on filters for Newbies like myself:https://www.mql5.com/en/articles/1577#9997

I'm a Newbie system developer and all the methods the author describes is exactly how I optimized my first couple of systems. I did those thing in that exact order as a matter of common sense. What I was hoping to get from this article are examples of using one indicator to filter out another. Example if (Macd<0 && CCI < 0). This approach have NEVER worked, all it does is decrease the # of Trades while killing a profitable CCI system. However, this is a very common technique in manual trading systems. 

Have you guys incorporated a Indicator vs Indicator effectively? Any pointers?

 
ubzen:

Nice Article on filters for Newbies like myself:https://www.mql5.com/en/articles/1577#9997

I'm a Newbie system developer and all the methods the author describes is exactly how I optimized my first couple of systems. I did those thing in that exact order as a matter of common sense. What I was hoping to get from this article are examples of using one indicator to filter out another. Example if (Macd<0 && CCI < 0). This approach have NEVER worked, all it does is decrease the # of Trades while killing a profitable CCI system. However, this is a very common technique in manual trading systems.

Have you guys incorporated a Indicator vs Indicator effectively? Any pointers?

ubzen, a couple of things come to mind if you're interested :

I've been putting off learning/using Strategy backtester for quite a while, I may need to use it eventually, but for now I only use it to test indicators visually. This is because Indicators for the most part is enough to tell/filter if I have a winning strategy or a weak one. I'm not just talking about line-crosses or if the value of some indicator is above certain number. It can verify your entrance in so many ways. In your example :

If(UK_session_Just_Open) // adding a time filter
{
   if(MACD[i+1] <= 0 && MACD[i+2] > 0)     // you need to use proper check for crosses filter
   { 
      if(CCI[i+1] <= 0  && CCI[i+2] > 0)  // this filter is checked only if MACD check is true, 
                                           // thus filtering an indicator with another indicator.
      { 
           if(FilteredSignal[i+3] == EMPTY_VALUE) // filtering useless zigzaging in short period of time
           {
              FilteredSignal[i+1] = High[i+1] + offset*Point; // draw a pointing arrow on top of last completed bar
           }
      } 
   }
} 

then you can do a loop to count the amount of Signal/arrow generated and you can regard it as amount of orders being sent. Better yet you can easily see if this strategy generate a profitable timely signal just by looking at the Indy attached to a chart.

I rather use this hierarchical check for filter than the series of && the article described. Its logics are more controlled. Note also that the third zigzaging filter may/may not be effective. It's just an example.

Trailing stop, TP, Hedging, MM and other orders logic is important but it's just the 'domino-effect' of your first logic to enter market. If you have your indi logic aligned and working then you have solid entrance. If it falters as Indicator, it won't survive in EA IMHO. For these you need to translate strategy logic to code precisely & effectively. Not an easy task for me also.

cameo

 

IMO the quality of filtering should not be determined by assessing the profit/loss metrics of its usage in a backtest with trading going on (that is convoluting the underlying characterstic of the filter) but rather the quality of a proposed filter should be determined by simple statistical assessment carried out by way of backtest without trading.

For example take a simple RSI(14) indicator and let's say you want to know if 30/70 is a good filter level versus another arbitrarily selected pairing such as 25/75 or 35/65. What you should want to know about the proposed filter is the histogram of characteristic events in your timeseries (historical data) when the filter condition would have been met.

How often (frequency and duration) does the market's price activity behave such that the filter is giving you (your EA) a signal?

The reason why you want to analyze the characteristic statistics of the filter, and not its impact on trading per se, is because of trigger masking owing to the series order of events. If you are using the filter to place an order and while that trade is active you proceed to ignore all ongoing filter triggers (you don't place multiple orders every time your trigger conditions are met) but at the end of the backtest you wish to interpret the win rates of the trades as being indicative of the quality of the filter triggers then you've completely tainted the distribution of filter triggers because the opened trade masked the existence of additional trade triggers (which themselves might have led to trades with losses, entirely changing the conclusions and merits of the proposed filter).

 
Well put Phillip. You have risen a lot of interest to backtesting for me btw. I have a lot of catching up to do :)).
 
Thanks a million again cameofx and phillip. This is what you'll expect of the Professionals forum senior members. You guys are so Smart. Hopefully someday I can participate in those advanced threads you-all generate. This helps re-define (in my head) what an advance filter is.
 

I'd like to be able to lay claim as having the prescience of developing this perspective prior to going out and losing veritable buttloads of cash; but, alas, this bounty of "foresight" is merely expensive hindsight on my behalf.

 
1005phillip:

I'd like to be able to lay claim as having the prescience of developing this perspective prior to going out and losing veritable buttloads of cash; but, alas, this bounty of "foresight" is merely expensive hindsight on my behalf.

All the more valuable for us then... :)

Thanks a million again cameofx and phillip. This is what you'll expect of the Professionals forum senior members. You guys are so Smart. Hopefully someday I can participate in those advanced threads you-all generate. This helps re-define (in my head) what an advance filter is.

ubzen, I most certainly believe I'm not entitled to be regarded as 'senior' or 'smart' in many respects or even be in the same sentence with it (though I need to wrote it in this sentence:)). I've sharpened my wits & skills on posts & discussions done by the likes of phy, CB, gordon, jjc, 1005phillip, Russel, WHRoeder, fbj, ukt, fireflies to name a few. These guys are the true 'Hall of Famers'. Enter any of these names to search box. And you will get a wealth of mql knowledge. But thank you for the compliment. All the best to you...

 

No kidding, those guys Rule !! LoL... cameofx, I've seen you holding your own in some threads with them. However, on another note. Something about your approach I've been thinking about. 1) You haven't been using Back-Tester only Indicators. 2) Your example above and preference for Indicators tells me you have a good understanding of Arrays[or Programming]. Something I don't have so I shy away from Indicators.

 

I can't shake the taught of you using observation to determine if your strategy is Strong or Not. This in my opinion would work only with limited number of entries. Unless, you're calculating by hand or programming in Stop-loss and Take-profit targets within the Indicator, this approach to me would seem dangerous and deceiving. People see only what they want to see is my experience. When you put hard numbers behind it thats where the surprise Always is. 

 
ubzen:

No kidding, those guys Rule !! LoL... cameofx, I've seen you holding your own in some threads with them. However, on another note. Something about your approach I've been thinking about. 1) You haven't been using Back-Tester only Indicators. 2) Your example above and preference for Indicators tells me you have a good understanding of Arrays[or Programming]. Something I don't have so I shy away from Indicators.

3) I can't shake the taught of you using observation to determine if your strategy is Strong or Not. This in my opinion would work only with limited number of entries. Unless, you're calculating by hand or programming in Stop-loss and Take-profit targets within the Indicator, this approach to me would seem dangerous and deceiving. People see only what they want to see is my experience. When you put hard numbers behind it thats where the surprise Always is.

Hi ubzen, sorry for the belated reply...

1) Yes. My indicators are still a pile of mess... Mostly I know what will be my signals. And I'm taking my time to make sure I understand & have all calculation optimization & indexing not wreak havoc when it is used.

2) No & no. I'm a self taught programmer going in my 2nd year. Still need to work on Arrays. Arrays & indexing are vital in programming unless you want to declare gazillion of variables in your calculation....:)

3) I can't think of any strategy that don't use Indicators to decide/signal market entry aside from random entry. Price action will need indicator to produce entry signal, trendlines & SR, arbitrage, statistical also. Only random entry perhaps that doesn't need signal. And this supposed to ba valid strategy so I've read...

"This in my opinion would work only with limited number of entries." -- I don't know what precisely that meant. But AFAIK if an indicator is designed and coded properly it will produce statistical & signal calculation for each data available in chart only excluding the first few beginning of bars. Thus giving all entry signal available. Now TP & SL, hedging, MM, Lot size etc. is a whole different matter. To optimize each of these, The ST I agree is the tool of choice.

ADDED : martingale/grid trading system perhaps also doesn't need to use entry signal.

Reason: