Optimizing Rayner Teo's Bollinger Bands Strategy for Better Results

Поділитися
Вставка
  • Опубліковано 4 лис 2024

КОМЕНТАРІ • 50

  • @vikastiwari8757
    @vikastiwari8757 2 роки тому +6

    sir please make a video on swing trading strategy with their backtest

    • @CodeTradingCafe
      @CodeTradingCafe  2 роки тому +1

      Something is already on the channel, watch carefully 🙂

    • @vikastiwari8757
      @vikastiwari8757 2 роки тому +1

      @@CodeTradingCafe i had seen it
      but please make 1 or 2 more,
      from which we can choose it

    • @CodeTradingCafe
      @CodeTradingCafe  2 роки тому +1

      @@vikastiwari8757 I will check for something good...

  • @rrjain319
    @rrjain319 2 роки тому +1

    Thanks for showing how to backtest a strategy.. How can we make use this code for real time execution.. what all modification we need to do.. can you please share how this can be done..

    • @CodeTradingCafe
      @CodeTradingCafe  2 роки тому +1

      Hi thank you for your support, I will make a video on how to go live with a strategy it's easier this way.

    • @rrjain319
      @rrjain319 2 роки тому +1

      @@CodeTradingCafe Thanks this would be a great help..

  • @thinketh2408
    @thinketh2408 2 роки тому +1

    Sir are algos for scalping are as good as for day trading?
    On what timeframe algos works best...
    Right now I'm into scalping and so far no algos and strategy seem to work..
    Kindly share your reviews...

    • @CodeTradingCafe
      @CodeTradingCafe  2 роки тому +1

      Hi, algos are different for scalping and day trading and different timeframes. Daily timeframe is usually easier than others for algorithms

  • @aaronsarinana1654
    @aaronsarinana1654 2 роки тому +1

    How about using zero-lag indicators like DEMA and TEMA instead of the simple EMA? DEMA is just a double EMA and, in theory, you have a zero-lag. I've seen other more complex filters with amazing resultas, like the Kalman filter, but the theory behind is quite heavy! ..

    • @CodeTradingCafe
      @CodeTradingCafe  2 роки тому

      Hi thanks for sharing, by Double EMA you mean like 2 EMA's or one ema length 2 bars?

  • @anderwork7571
    @anderwork7571 2 роки тому +1

    Hello,
    I am trying to collect the data of each trade within the backtesting results.
    Reading the documentation, I have seen that the trades have a "pl_pct" attribute that reflects the profit or loss in percentage of each trade. I'm right?
    However, when I try to collect the trade data treating it as a dataframe: stats[_trade] I don't find the column referring to that property. How can I find that type of data (pl, pl_pct...) of each trade once the backtesting is done?
    Thank you

  • @royconte7933
    @royconte7933 11 місяців тому +1

    Thanks for this awesome video. Can you do one with python codes for the William Alligator?

    • @CodeTradingCafe
      @CodeTradingCafe  11 місяців тому +1

      Hi, thank you, it's on my list but not a priority to be honest, now focusing on live trading deployment and next maybe Machine Learning again.

  • @luismiguelgutierrez6173
    @luismiguelgutierrez6173 2 роки тому +1

    What if you add two or more EMAs for trend detection. A slow EMA that corresponds to a higher time frame and two faster ones for a smaller timeframe, so every cross marks the beginning of the new trend. Regarding exits, you could possibly apply the RSI and the fast EMA cross strategy together.

    • @CodeTradingCafe
      @CodeTradingCafe  2 роки тому

      Did something almost similar for the next video 🙂 will see how it goes...

    • @vikastiwari8757
      @vikastiwari8757 2 роки тому +2

      @@CodeTradingCafe then eagerly waiting for it.
      Please make video on supertrend, macd as well

    • @CodeTradingCafe
      @CodeTradingCafe  2 роки тому +1

      Lots on the list but nice to see the results at the end

  • @kitefrog
    @kitefrog 2 роки тому +1

    Can you do a video on reverse divergence of RSI when price is trending over or under a slow MA? Use the MA to decide trade Direction.

    • @CodeTradingCafe
      @CodeTradingCafe  2 роки тому

      Hi, I did a video on RSI divergence but without the backtesting part just the automated indicator, is that what you mean?

  • @jdf2159
    @jdf2159 2 роки тому +2

    Do you maybe have a Python Source code for auto trendlines?

    • @CodeTradingCafe
      @CodeTradingCafe  2 роки тому

      Hi, try this video might be useful and the code is downloadable as well ua-cam.com/video/phy57DZOIwc/v-deo.html

  • @AMA_RILDO
    @AMA_RILDO 2 роки тому +1

    hey mate thank you to share your knowledge. I would say, all we know the backtesting is crucial in the algorithms, would you mind me to asking you to make a video tutorial regarding only backtesting? Other UA-camrs has made some little tutorial but I think learn from you would be for us. Thank you in advance❤️

    • @AMA_RILDO
      @AMA_RILDO 2 роки тому

      **would be better** I would say

    • @CodeTradingCafe
      @CodeTradingCafe  2 роки тому +4

      Thank you for your support, yes backtesting will be covered

  • @cooperdes3950
    @cooperdes3950 2 роки тому +1

    From my experience I’ve found using a trailing sl of about a half a percent of current close works well for this type of mean reversion. Tested on QQQ 4h I’ve seen profit factors up to 3.7 with around 90 trades (since 6/1/18). However does not work nearly as well on other stocks, so likely needs more tweaking

    • @CodeTradingCafe
      @CodeTradingCafe  2 роки тому

      Yes it's frustrating when it's working well on one stock and not much on another. Robustness is important as well.

  • @easyxpress
    @easyxpress 2 роки тому +1

    The code attached here is the original code, not this optimized one. Please fix. Thx.

    • @CodeTradingCafe
      @CodeTradingCafe  2 роки тому

      Hi thanks for the heads up, to be honest I have such a mess in my folders I can't find the correct file... I will post it if I can achieve this 🙂 in the meantime sorry

  • @sbqb21
    @sbqb21 2 місяці тому +1

    Can you test William % range ?🎉

    • @CodeTradingCafe
      @CodeTradingCafe  2 місяці тому

      sure, do you have any particular reference or strategy in mind?

  • @eunjijeon444
    @eunjijeon444 2 роки тому +1

    Thank you for sharing a special strategy! btw, could you make a video for double bottom/top strategy in python??it would be so grateful if you do! Thanks! :D

    • @CodeTradingCafe
      @CodeTradingCafe  2 роки тому

      Hi thank you for your support, there are 2 videos about triangle band head and shoulders detection did you check them out?

  • @thinketh2408
    @thinketh2408 2 роки тому

    And how to optimize the strategy as when optimization only works for the period algos is optimize for.

    • @CodeTradingCafe
      @CodeTradingCafe  2 роки тому

      Well need to optimize one more time

    • @thinketh2408
      @thinketh2408 2 роки тому +1

      @@CodeTradingCafe 🤣

    • @CodeTradingCafe
      @CodeTradingCafe  2 роки тому +1

      I Know lol, but it's more complicated than it seems most of the time is spent on optimization

    • @thinketh2408
      @thinketh2408 2 роки тому

      @@CodeTradingCafe it will be huge help if you would make video on the optimization techniques..
      More over I have found there are many other python backtest libraries whats your comments on them?

    • @aaronsarinana1654
      @aaronsarinana1654 2 роки тому +1

      @@CodeTradingCafe how about doing something more automatic, for example, something similar to the grid search method used in machine learning. It's just a brute force optimization. Set a range of the value of the parameters you want to optimiza and loop through all possible combinations evaluating at each step some particular value, say the returns. You can leave all night if you want, not in a hurry here! ...