Market Sentiment Filter Analysis

Forums ProRealTime English forum General trading discussions Market Sentiment Filter Analysis

Viewing 15 posts - 1 through 15 (of 15 total)
  • #92405

    I just got to thinking about market sentiment filters. Usually we like to add a filter to our strategies that says only trade long if this condition and only trade short if not this condition – for example go only long if above MA200 and only go short if below MA200…. and I got to thinking that wouldn’t it be nice if we could quantify these filters so as to ensure that we are using a good one for the instrument that we are trading. My initial idea is to count green candles when long filter is valid and count red candles when short filter is valid. This way we can give a ‘quality rating’ to our sentiment filter so as to compare various filters. Another thought is to count median price rises and median price drops compared to the last candle. Maybe even several different types of quality ratings could improve the overall rating?

    I’d be interested if anybody has any ideas on how best to decide on quality and also maybe a list of common sentiment filters to test it on. My end idea is to create a simple indicator that can be applied to any chart and any time frame and which then decides which is the best sentiment filter to use to improve a strategy.

    1 user thanked author for this post.
    #92415

    Here’s a start of a code to show the sort of thing that I was thinking of:

    Screenshot_4-1

    It can be seen that based on five different quality gauges the ROC[22] sentiment filter scores a far higher sentiment filter quality rating than the average filters or the look back filter.

    #92418

    I’m thinking that it might be better to write it as a fake strategy as that way we can optimize a variable so as to see a bigger range of sentiment filters. The other option is another for next loop and some code to identify which filter is the highest scoring of them all. Maybe I am already overcomplicating it!

    #92422

    I realised that there is a flaw in my code as it is recording quality and filter conditions met on the same candle where in reality we need to check filter conditions as being met on the previous candle and then record the quality on the current candle. Here is the modified code so far with some added filters:

    Screenshot_5-1

    RSI[14] rising or falling is currently showing as the best quality sentiment filter on EURUSD Daily.

    #92440

    Hello Vonasi,

    Maybe we can add a Point Pivot filter, so wheter the price is above or below is 1H Pivot?

     

     

    #92442

    At the moment I am trying to stick to daily charts but your code and some other filter ideas that I have had have raised the issue that the way it is coded at the moment only allows for sentiment filters where a condition is either met or not met rather than two slightly different conditions that toggle between bullish and bearish (for example your high and low pivot breaks) – so I may have to rethink the way it is coded.

    Another thought that I had was that it might make an interesting strategy idea. Quality ratings for each sentiment filter could be recorded and then each new candle checked to see which conditions it meets and given an overall quality rating for bullish or bearish. The quality rating would need to be normalized by dividing the latest result by the number of candles so far so the chart would be more like this:

    Screenshot_2-2

     

    #92445

    Hello, is it possible to plot/graph in what market filter it was during my trades (from backtest)?

     

    Does that make sense?

    I would like to see if the majority of my winning trades match with one or more of your filter 1-8

    #92448

    That is an interesting new way of looking at it jebus89!  Within your strategy you would need to check what filter conditions are met at each entry order and flag them as being met and then check to see if it is a profit or non profit trade at the exit and score each relevant filter accordingly and then reset the flags. With straight market orders it should be do-able and even possible with pending orders if you check that the levels were hit. It is too difficult to do if there are multiple positions but very possible for single positions.

    #92450

    Here is my first slightly messy attempt to give each filter a rating and then check the current candle to see which filters it meets and give it an overall rating. if the line is below zero then it indicates short and the further below the stronger the signal.

    Screenshot_3-3

     

    #92453

    It is quiet interesting to see how clearly the bull and bear periods are highlighted by either overall raised ratings or overall lowered ratings when you zoom out.

    Screenshot_4-2

    #92456

    Note: I just realised that my MACD filter has the wrong settings in all the above code – it should be MACD[12,26,9] and not MACD[26,12,9]. I guess this can happen if coding in the early hours after a glass or two of wine!

    #92457

    Sorry I thought it was intraday. But Daily Pivot Point are widely use for trading equity index, so curious on this compares to other indicators.

     

    #92458

    stefou102 – How would you set the sentiment filter condition? Today’s pivot is higher or lower than yesterdays pivot? The close is higher or lower than the pivot? I feel it would be a bit choppy as a sentiment filter but we can try something.

    Here is the code with the two above filters added and the results with the ‘This Bar’ result hidden.

    Screenshot_5-2

     

    It appears that comparing close to PPDay is a pretty good sentiment filter on the EURUSD although this is a bit like saying what is the probability of price going up tomorrow if price closes above the pivot point? Not really a market filter but maybe something that improves our chance of being right tomorrow!

    #92479

    Indeed the simple theory around Pivot Point is if price is above daily pivot point, this is bullish and vice versa. For traders, Pivot Points and their extention S1/S2/S3 R1/R1/R3 give support and resistance level, which in conjunction with more classical resistance/support drawing (previous high/low, bollinger bands, etc), can confirm some strong inflexion price, certainly when the market is not in “one direction” mode.

    So if I understand well your work, pivot point and RSI both stand out as quality filter so far?

    #92482

    So if I understand well your work, pivot point and RSI both stand out as quality filter so far?

    The whole concept of giving a quality rating to filter conditions is still a work in progress in its early stages. I have only so far tested on one instrument and I have not even really gone through the code with a fine tooth comb to make sure that it is doing what I think it is doing so I would not use any of the results as the basis for deciding on a filter for a strategy just yet!

    Unfortunately I am busy at the moment with other non trading related projects and so I am really only giving this a few minutes at a time when I get a chance to.

Viewing 15 posts - 1 through 15 (of 15 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login