Moving Average Trading Strategy Backtesting In Python

Поделиться
HTML-код
  • Опубликовано: 16 сен 2024

Комментарии • 34

  • @sibiljas3628
    @sibiljas3628 2 года назад +4

    you are a good man.please continue

  • @wingsoftechnology5302
    @wingsoftechnology5302 2 года назад +2

    Really........Awesome & Genuine content......😍😍
    thanks for making such NEW & Informative Strategies.. &,
    Keep it up.... Bro👍👍👍👍👍👍👍👍

  • @abdsh422
    @abdsh422 11 месяцев назад +1

    You are correct; this strategy may not perform effectively in a horizontal market, but it exhibits more strength in a trending one. I've incorporated an indicator to act as a trigger for the strategy, activating it during trending markets and deactivating it during non-trending ones. To achieve this, I rely on the slope of the moving average, which indicates how decisively the moving average is ascending or descending. However, distinguishing between a change in market direction and a horizontal market remains a challenge, and I'm actively working on fine-tuning this aspect
    Please feel free to add any suggestion that may help or correct me if I am wrong

    • @CodeTradingCafe
      @CodeTradingCafe  11 месяцев назад +1

      Hi thank you for sharing, I think the slope idea is good you just need to optimize the slope window, like how many candles you average to get the slope, this would change how your trigger works.

  • @delhitepawan5804
    @delhitepawan5804 2 года назад +2

    good video buddy. will try this. Please make more videos so our knowledge can increase, Thanks

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Thank you for your support I am glad the videos are helping

  • @tigerpainset8792
    @tigerpainset8792 Год назад

    It the bast video thank you for share your experince :-)

    • @CodeTradingCafe
      @CodeTradingCafe  Год назад

      I am glad you liked it thank you for your appreciation!

  • @abdellatifessamir8121
    @abdellatifessamir8121 Год назад +1

    thank you for your working

    • @CodeTradingCafe
      @CodeTradingCafe  Год назад

      Thank you for your support, good luck for the coming year!

  • @ugurpotaker8903
    @ugurpotaker8903 2 года назад +1

    Great tutorial, will try to implement other strategies. Can you explain the codes more detalied in the future videos? Thank you!

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Hi thank you for your comment, I will add some explanation in the future but videos become longer... Will try to

  • @santhoshdasari7
    @santhoshdasari7 2 года назад +2

    Thanks for sharing ur knowledge…. Could u please provide the link for downloading the code

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Yes sorry I forgot to upload it, I will share the link in the description of the video and let you know

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Ok it's available now in the description of the video

    • @santhoshdasari7
      @santhoshdasari7 2 года назад +1

      @@CodeTradingCafe Thanks a lot!!!

  • @SubhanSadad109
    @SubhanSadad109 2 года назад +1

    love your videos !

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      It's nice to know you are enjoying these, thank you for your support 😊

  • @fisal-oe2ze
    @fisal-oe2ze 2 года назад +2

    Hello, is there away to train an AI to use a code to find a signal in the data set(so signal not provided) , then train the same AI to find a repeatable pattern , and then train it to trade the pattern ?and thank you so much for all the amazing videos ,i really learn a lot from u .

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Theoretically yes there is I have tried it in the past (before this channel was started) I faced 2 problems 1st was overfiting in the sense that the code was trying to look for exactly the same situation (so it was kind of naive algorithm) and 2nd was that I had barely 1 signal per year so couldn't really test if it is statistically working.
      Thank you for your support I am happy these videos are of help.

    • @fisal-oe2ze
      @fisal-oe2ze 2 года назад +1

      @@CodeTradingCafe :) , what u called problems , is actually what i am trying to get 2 . it might look like problem if u r swing trading or investing for long term , but if u r day trading ,these problems actually what will make u money. is it possible u can make a video about it , or maybe give me some pointer how to do it , THX

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +2

      @@fisal-oe2ze the easiest to start in this direction is to pass values of high low open and close prices of let's say the last 5 or 10 or so candles depending on the pattern window to a neural networks model, obviously you will need to find a way to normalize the input data for example taking for reference the highest or lowest point of current candle (so all the values are related to this reference point). This way the neural model will read the relative candles values and try to relate to a previous similar situation. But I am telling you it's a crazy road you need a lot of patience,🙂

  • @surething119
    @surething119 Год назад +1

    really inspiring

    • @CodeTradingCafe
      @CodeTradingCafe  Год назад

      Thank you, nice photo by the way... I am suspecting Fibonacci numbers are somewhere in there 🙂

    • @surething119
      @surething119 Год назад +1

      @@CodeTradingCafe Thanks. And about Fibonacci numbers, your eyes are at least as good as your coding skills I see :) lol

  • @Dr.jayfrancis
    @Dr.jayfrancis 2 года назад +3

    Will make me rich 🤑

  • @user-cz6ht4ot7o
    @user-cz6ht4ot7o 2 года назад +1

    SIR PLEASE MAKE MORE VIEDOS ON "AI" IN STOCK MARKET🙏

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Thank you for your comment, videos are on the way

  • @m.mumber8591
    @m.mumber8591 9 месяцев назад

    ​ @CodeTradingCafe I am trying to reproduce the work you done in this video every thing is ok expect at final stage I am getting error in the line "bt = Backtest(df, MyStrat, cash=10_000, commission=.000)". I am getting error "ValueError: `data` must be a pandas.DataFrame with columns 'Open', 'High', 'Low', 'Close', and (optionally) 'Volume'". Please help me to resolve this error.

    • @CodeTradingCafe
      @CodeTradingCafe  9 месяцев назад

      Check the content of the dataframe df it should have the columns Open High ... capital letters