The Most Realistic Automated Trading Analysis Using Python

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

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

  • @MartinPleasant-ty1rw
    @MartinPleasant-ty1rw 9 месяцев назад +8

    I’m now going to watch all of your videos. I’ve just came across your channel and your videos… they are amazing. I’m just starting my journey in algorithmic trading/ learning python and you are the best most straightforward channel on RUclips in this area. These tutorials and guides you are sharing are so informative please keep doing your thing, there is so much value to the information you are sharing and it gives me hope that I can learn these things. Thank you so much. You’re the Best!

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

      Welcome aboard! I hope you will enjoy coding as much as I do.

  • @christophermatthews4896
    @christophermatthews4896 9 месяцев назад +8

    Great to finally see some results! i love the usage of statistical analysis for tests. i also like the concept of retraining the bot every Sunday, thats a concept i haven’t seen put into practice yet. great video!!!

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

      Glad you liked it! Thanks for the support, I deployed the updated version already, just need to wait, I will also be re-verifying the code for some bugs, it might happen!

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

      Can’t wait to see the updates!!

    • @DavidRoyPennCollazos
      @DavidRoyPennCollazos 7 месяцев назад

      ​@@CodeTradingCafe When's the video??

  • @muhireinnocent2371
    @muhireinnocent2371 9 месяцев назад +2

    I deployed a similar bot on aws and its almost blowing up my demo account. Thanks for your content though i have learnt alot from your algo trading tutorials.

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

      however i have found that if you use Bollinger bands ,rsi and stochastic indicator on 1h chart we can get nice price reversal movement positions and with high return on investment, low maximum drawn down and higher win rate. but the trades are limited, i have tried to increase the number of trades by looping through many currency pairs

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

      I am still skeptical the difference between backtesting, forward testing and live exceeded my expectations I am suspecting a small bug somewhere... will have to re-verify.

  • @Djamonon
    @Djamonon 9 месяцев назад +1

    Loving this series! I've learned a lot from it!
    I've been trying to optimize this strategy myself and I have noticed that perhaps the problem lies in not accounting for commission during the backtest. Just adding commission changes the results a lot. I assume that backtesting without commission favors strategies that involve a very high number of trades (such as this one). I would love to see you backtesting this strategy while considering commission and spread. Thanks!

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

      Hi, thanks I agree, I usually discard commissions to test the indicator effect, later if results are good I add commissions but Trade management has to be up to the level. Will test with commissions but must increase timeframe.

    • @OsirisHorscow
      @OsirisHorscow 8 месяцев назад

      @@CodeTradingCafe Do you have any update on this tested with commissions ? For Oanda Core pricing (what I believe you use here on the demo account) do you put in the total 0.0001 for the backtesting commission value or do you put in the 0.00005 that is per trade order?

  • @MasamuneX
    @MasamuneX 8 месяцев назад +1

    trailing stops and exponental position times outs to allow for market conditions to change into more favorable ones after a losing trade by the system.

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

      Hi, saw your other comment, helpful thank you!

  • @Newbie-dv9gc
    @Newbie-dv9gc 9 месяцев назад +31

    If you change signals.(for example,sell to buy and buy to sell.)This strategy is promising 😂😂😂

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

      😅

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

      Lol 😅, actually it doesn't work either, but ... you reminded of an idea I tried some time ago, use the Bollinger Bands a bit wider to detect a change or break of the trend, it has good results on EURUSD even with spread fees. It does work the opposite way though because it's detecting reversals instead of trading with the trend, same indicators but completely different strategy.

    • @nuweariho6884
      @nuweariho6884 9 месяцев назад +1

      I came to realize most indicators confirm to you when the trend is completed so when you enter on a sell its actually a buy😂.
      I dont know the effect if aglo trading is limited to cetain hours of the day to avoid those false signals which may increase the profitability.

    • @a-m-vclips9653
      @a-m-vclips9653 9 месяцев назад +1

      I actually did the same for my live demo bot(with this strategy) it worked pretty well, but in long term I just keep losing because of commission fees and tight stoploss

    • @nuweariho6884
      @nuweariho6884 9 месяцев назад +1

      @@a-m-vclips9653 undoubtebly the commisions will fail you.
      Probably design a trading strategy that fails extremely well such that you trade the opposite

  • @derhut6560
    @derhut6560 9 месяцев назад +5

    Thanks for sharing. Did you run the backtest script over this live-trading month for comparison? Might be interesting to identify analyze differences to the life account, maybe also finding errors in the implementation or backtesting?

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

      I haven't ... I should, maybe I will check it out this week, but it's a great idea to compare live results with backtesting results over the same period. Will keep us posted.

  • @PERRY135824
    @PERRY135824 9 месяцев назад +1

    Thanks for sharing. I believe you should also try backtesting your strategy using the same period as shown in your video.
    I highly suspect that it's a slippage problem or something related to the execution part, rather than an issue with the time frame as you mentioned. I have traded with this kind of CFD brokerage before and found that the performance of my strategy varied between different brokerages.

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

      Yes, this was proposed yesterday as well, I think we need to verify this.

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

      @@CodeTradingCafeCFD isn't regulated. test on a regulated exchange.

  • @AngjelosBraholli
    @AngjelosBraholli 9 месяцев назад +1

    @CodeTrading
    when i run
    import pandas as pd
    df = pd.read_csv("transactions.csv")
    it shows this error :
    ModuleNotFoundError Traceback (most recent call last)
    Cell In[4], line 1
    ----> 1 import pandas as pd
    3 df = pd.read_csv("transactions.csv")
    ModuleNotFoundError: No module named 'pandas'
    what is wrong?

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

      Seems that you don't have pandas installed, try in the notebook the following command !pip install pandas

  • @davidzamora212
    @davidzamora212 9 месяцев назад +1

    when building a NN, how do you select the perfect hyperparameters (layers and units per layer) without overfitting?

    • @lucastorres394
      @lucastorres394 9 месяцев назад +1

      Do not use NN

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

      It's a long technical answer, but the short one is NN don't really work this way for trading.

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

      why?@@lucastorres394

  • @genadygolovkin5382
    @genadygolovkin5382 9 месяцев назад +1

    Hi. thank you for the work that you do. Is there any way that you could test Smoothed Heiken Ashi indicator on different time frames ?

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

      Hi, I understand the idea, but I never got good results with Heiken Ashi, I don't even know how anyone is making money using these (out of curiosity), the way they are computed they add lag and twisted/smoothed prices.

  • @preetipics
    @preetipics 9 месяцев назад +1

    would really love to see the automated optimisation process and ideally code when done please?!

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

      It's deployed already I just need to make a video.

    • @preetipics
      @preetipics 9 месяцев назад +1

      @@CodeTradingCafe amazing, look forward to it for sure

  • @sohailtangeet8068
    @sohailtangeet8068 9 месяцев назад +1

    great vid! can you do a video explaining why you buy 3000 units? and if possible, explain how to calculate this figure. thanks!

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

      Hi, in forex standard lot is 100 000 units so 3000 is like 0.03 on metatrader, no particular reason for choosing this sum, I just wanted to be consistent for comparison and kept using 3000, I will make a video on different lot sizing methods.

    • @sohailtangeet8068
      @sohailtangeet8068 9 месяцев назад +1

      ty. very excited!

  • @preetipics
    @preetipics 9 месяцев назад +1

    great results analysis.thanks

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

      Kind of clarifies how the bot is doing.

  • @khatericamata8942
    @khatericamata8942 9 месяцев назад +1

    Good day Sir, your RUclips video is impressive and great! May I ask if I can edit the strategies? And also, to use any API Trading Platforms and to test Crypto? Can it be used as paper trading? Thank you so much Sir.

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

      Yes absolutely, you just need to know your way around Python, check this video for live trading ruclips.net/video/bZhtvvFm17A/видео.html

  • @DarmendrenRavindran
    @DarmendrenRavindran 9 месяцев назад +1

    Hi, if possible can you guide how to deploy the code in was server

  • @HisagEhis
    @HisagEhis 9 месяцев назад +2

    thanks great content
    how can i automate my trading system

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

      Hi check my latest videos about this strategy for automation.

  • @m.agussantoso
    @m.agussantoso 9 месяцев назад +1

    Is there any update on this?

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

      I checked yesterday, sorry to disappoint, … it has been an honor trading with you :)
      Joking aside it's failing when the market is not trending, even with the updates, I will make another video anyway to show I did the updates.

  • @meawpong2008
    @meawpong2008 9 месяцев назад +1

    Great.... Thank for your share.

  • @seguidor777
    @seguidor777 9 месяцев назад +2

    Hello, do you have a patreon page?

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

      Hi, no patreon sorry, just these videos for now :) thanks a lot for your support.

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

    Hello, I advise you to compare those trades with backtests results, and focus on comparing open trades time - this is the key for success, I checked your code with backtest and in my opinion you have a 1hour leak. Maybe the good idea would be to create your own backtest code instead of using library? Its helpful to be able to know details of every trade - with your own backtest algorithm you can control it

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

      Hi, thank you, can you point me out to the "leak" so I can verify on my end. I just need to avoid building a whole library from scratch.

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

    Hey! Interesting video, thanks for that.
    One addition or consideration that I am interested in: if you take the month of price data and runned it against your backtest. Would your simulated results be really close to your actual results? This to prevent that you are overlooking things not considered in the backtest (e.g. Fill price, exits and so on).
    Thanks! Stan

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

      Ah sorry… i just saw someone else already had the same suggestion as well👍🏼

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

      No problem, I think it's very important suggestion, I will put it on the priorities list, I am also suspecting an edge case bug in the live version (last candle might be skipped and we are maybe using the candle before it... I need to verify this as well). Thank you for your comment, I will keep us posted.

  • @nkwebikarome4764
    @nkwebikarome4764 9 месяцев назад +1

    Love there feedback !!

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

    Great stuff. What period will the automated optimisation be run over Zian? The previous weeks data?

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

      For now it fits on the last 3 weeks, I might increase to 4 weeks, see how it works.

  • @b.kvinaykumar391
    @b.kvinaykumar391 9 месяцев назад +1

    Can you make a strategy for Indian market for derivatives it is a humble request

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

      Hi, thank you for your comment. The strategies I post here are generic purely technical so any strategy that works in here should also work on any market theoretically, you can take any code and just test is on Indian market data.

  • @Notknows
    @Notknows 9 месяцев назад +2

    Dr Ziad Francis is very genuine, i had his udemy lecture its a good insight to algo trading

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

      Thank you Harit for your support, glad you liked the course.

  • @geudgsg179
    @geudgsg179 9 месяцев назад +1

    If i have a good idea for trade bot very good can i tell about it

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

      Only if it's a good idea 😀

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

      @@CodeTradingCafe don't Don't worry it is good idea 100% we going to make profit and i have many ideas but how can i contact with you do you have discord or Facebook

    • @geudgsg179
      @geudgsg179 9 месяцев назад +1

      😊Yes it is we going make profit 100% and i have many ideas but how can i contact with you do you have discord or Facebook

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

      No discord, Just email for now codingntrading gmail com

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

      @@CodeTradingCafe i send to you a email did you see it

  • @animeshbarai5272
    @animeshbarai5272 9 месяцев назад +1

    i am waiting for your next machine learnign and algorithmic trading udemy course . i laerned a lot from it please create a advance version of it.

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

      Thank you for your kind support! It's going to take some time for this, I haven't even planned the curriculum yet.

  • @AhmedAli-go7wx
    @AhmedAli-go7wx 9 месяцев назад +1

    graet work , I am wating new news

  • @BoHorror
    @BoHorror 9 месяцев назад +1

    Try longer time frames, where maybe you could capitalize on the trend so the hourly and the 4 hourly, okay I maybe be spitballing here but it could be worth trying

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

      Actually you are absolutely right, higher timeframes are much easier to auto trade, somehow this channel dragged me down to lower timeframes and new experiments, my preference though is the daily tf.

  • @poisonza
    @poisonza 9 месяцев назад +2

    If you keep adding more constraints to improve it, isn't there a risk of overfitting? Good luck 😅

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

      It depends, in this case note really, because we are not fitting the indicators, so we can't really overfit from this perspective, we are just fitting the trade management part: the SL and TP, the rest remains the same. Anyway, the only mod I might add is simply the dynamic fitting every week, it's still reasonable in my opinion.

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

    great video.
    can you also test on crypto please?
    thanks

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

      Now that BTC is climbing yes let's test next strategies on crypto :)

    • @eitan71
      @eitan71 9 месяцев назад +1

      @@CodeTradingCafe
      Great!
      Thank you

  • @RohitGupta-ys6bl
    @RohitGupta-ys6bl 9 месяцев назад +1

    Hi , sir ❤❤❤ Iove from India .
    I have one statergy if will create in indian stock market using any Indian broker api .
    It is very help full for me ❤❤❤❤

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

      Glad this video is of help, good luck for your coding.

  • @jasonreviews
    @jasonreviews 9 месяцев назад +2

    it's just coin flip. Just make random small trades everyday. it's literally too random.

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

      Yes and no, the backtest doesn't show positive results for random tossing but it does for this indicator, and it's clear that extreme values detected outside of BB indicate a price bouncing and converging to the center of the band, makes sense. But there is still a detail messing up the trades, and it would be great to find it... and correct it.

  • @TraderSam96
    @TraderSam96 9 месяцев назад +1

    I would love to collaborate with you on this project, how can I contact you,I'm a developer also

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

      Hi, let me know what's your plan.

    • @algo_masters
      @algo_masters 9 месяцев назад +1

      i am a developer aswell. can we have a common forum for developers please

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

    hey , loved ur content ,want to contact you , any gmail etc?

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

      Hey, thank you, my email is in the about section of this channel codingntrading at gmail com