AutoTrading - Thoughts on mitigating stock buy orders on a down market day?

Discussion in 'Automated Trading' started by stevenmac22, Sep 15, 2023.

  1. Hi Everyone,

    One of my challenges that I have been thinking about with my automated trading is that when days (such as today) have downward price action, I don't have a rule in place to prevent buying.

    I am open to thoughts here, but thinking along these lines would be to determine price change by pulling quotes on SPY, IWO, and QQQ. If all 3 are negative price change, then possibly block the buy order, otherwise if all 3 positive price action, allow the buy order to go through?

    I recalled that O'Neil said that 75% of stocks follow the market trend, so while a stock could be an exception due to a catalyst, I am wondering if it may be best to hold the buy order until conditions improve to being positive?

    Thanks for any other considerations or perspective that could be a solution.

    SM
     
    Last edited: Sep 15, 2023
    murray t turtle likes this.
  2. maxinger

    maxinger

    You should have a rule to allow selling.

    When you have a rule to allow buying AND selling,
    then your mind will become active / critical / busy;
    You start to analyze the trend appropriately and decide if the market is
    uptrend
    downtrend or
    trendless

    If not, you will always be biased toward the uptrend
     
    comagnum likes this.
  3. %%
    DONT know ;
    except 75%on SPY + QQQ maybe abit much.
    especially on SPY,QQQ,,,,,, [XLE] not in any of those exactly @ close.
    i dont trade DIA or DOW that much;
    but one of the best all time short term trade quote$ was public profitable daytrader on those ''DOW is correlated to itself'' Exactly = Dow is correlated to itself.
    Same with SPY, liquidity leader hope this helps/ wisdom is profitable to direct.
    The way i do +did it it is cut a loss on smaller QLD, even if its up a few @ close .
    XLE has more risk but doable, smaller size with me on the more risky stuff...
     
  4. Maybe this would be helpful in another way.

    Today, the BOT opened a trade on FLR @ 35.70 today which did a run up to a high of 36.10, but reversed itself.

    FLR is part of the IWO, but not a holding within SPY and QQQ. It could buy AAPL which is not on IWO, but is part of SPY and QQQ.

    With that being said, SPY, QQQ, and IWO all had negative price action today. At the time of the buy on FLR, all 3 of SPY, QQQ, and IWO were negative in opening down. As a result of continued downward pressure, with eventually the DOW -288.87, NASDAQ -217.7179, SPX -54.78.

    The position was taken when there was negative price change occurring, that eventually cause FLR to close at 35.56 (slightly down from the buy-point).

    What my thoughts are is to develop a rule that if these are trading negatively, then the system should not take the buy and go long. My thought to do that is by checking the current make of at least 3 ETFs for reference and see if from open to current mark if they are up or down in price change.

    Now, I am not certain if the criteria should be for SPY, IWO, and QQQ:

    If 3 Positive, then "Allow Buy"
    If 2 Positive and 1 Negative, then "Allow Buy"
    If 1 Positive and 2 Negative, then "Prevent Buy"
    If All Negative, then "Prevent Buy"

    I know this seems simplistic and maybe that is all that is required, but if there is different criteria or other market securities that I could check before buying, I want to consider those.

    What I am trying to prevent is buying when the market is in a downward intraday trend.

    Additional thoughts on this?
    Thank you.
     
  5. You are essentially facing the same problem we all do when we try to develop an algo: How to determine a trend.

    Focus on that first, improve the way your algorithm can follow a trend. There are many ways to do it, but average returns and moving averages are usually the way to go.

    Once you have an accurate trend in place it will be easy to tell your algo to not to trade on a downside trend.
     
  6. Thank you for your response. Yes simply put as you have stated it, it's about the trend direction.

    I do have some trend detection (on a daily timeframe) that I just built in last week that I can expand out a bit further that is primarily based on the MAs as you talked about.

    Now I need to build out the intraday check to detect for negative or positive price change that I mentioned above to see what results I could get out of this. If there is negative trading pressure for the day, it may be best the system doesn't trade. I think it will also need an additional rule on the buy (maybe only trade if +75 points or higher?) Somehow I need to prevent getting caught in chop if price change stays about flat.

    In similar fashion, we see a lot of traders make statements like, "market action looks poor... market is choppy... ", so I am not going to trade today. The BOT needs similar rules to just sit out for the day and just only monitor existing positions.

    Do you have any further thoughts about this or suggestions around trend/intraday market direction?

    Thank you!
    SM
     
    Last edited: Sep 16, 2023
  7. I do have to add a clarifying point that right now the BOT can only trade 1 direction - long as I haven't given it yet the capability to go short. Once I am able to do that, it should be able to switch at appropriate levels. Currently, the challenge is buying long despite that the market conditions say otherwise until I can build that capability in.

    The other possibility is rather than shorting, to have the system switch to some inverse ETFs.
     
  8. Short term trend prediction is almost impossible, there's too much noise involved in an intraday timeframe. You might be successful with daily and weekly patterns. Some say that monthly patterns are the only really reliable ones to determine trends and they might be right. Essentially the longer the time frame the easier to spot a trend.

    You can add up a few indicators in order to generate a strong signal. Overbought|Oversold market indicators with return averages should give you a starting point. For fine tuning you could use market profiles with order book data.

    Still very tough to achieve, trend forecasting is the key to the gold chest, if you can get something accurate you will hit the right note.
     
  9. Thank you for your continued insights. The best I can do is attempt to experiment and monitor the performance.

    One consideration I had thought about incorporating is since I am able to pull in a portion of economical calendar of events, I may have the BOT not open any trades on the days of FOMC statements due to the high volatility. Sometimes can work in favor other times against - usually the latter.

    Appreciate your time and interaction on this.