Тёмный
CodeTrading
CodeTrading
CodeTrading
Подписаться
Education channel providing simple and quick lessons on related topics: Python, Data Analysis, Machine Learning and data driven applications like stocks and currencies trading.
I hope these videos will be of help, Good luck to you in your coding journey !

🍓Discover how easy Python can be. Learning Courses Discounts (links below):
* Algorithmic Trading In Python
* Python basics,
* Object Oriented Programming In Python
* Data Analysis In Pandas And NumPy
* Machine Learning In Trading

Python is easy to learn and if I could do it then surely you can as well !

DISCLAIMER: The information contained in this channel is presented for educational purposes ONLY, I am NOT a financial expert nor a financial consultant, if you decide to use any of the content of this channel you may do so at your own responsibility. Although I do my best to provide reliable information I am NOT responsible for any losses incurred due to any trading systems presented on this channel.
Live Trading Bot Strategy In Python
14:57
6 месяцев назад
Trading with Python: Simple Scalping Strategy
13:47
6 месяцев назад
Комментарии
@hepsser7399
@hepsser7399 46 минут назад
Somebody that did this for MetaTrader 5?
@kshitizmiglani6402
@kshitizmiglani6402 День назад
great content. just subscribed. when i comment this line: df=df[df.High!=df.Low] winrate drops to around 45% which is huge is this step something you do for most strategies or is this part of this setup specifically? Will play around and report soon
@kshitizmiglani6402
@kshitizmiglani6402 День назад
and i tested that varying lens for bband 20 30 40 50 60 70. gives best result at bband(len=30->40) winrate 66->75
@kshitizmiglani6402
@kshitizmiglani6402 День назад
bbandlen = 40 rsilen = 21 winrate = 80%
@AbdulRasheed-uf1ns
@AbdulRasheed-uf1ns День назад
after going through codility.. its a trash ..its not gonna bring any good devs to an industry. given we have alot of libs , available docs, this is again bringing back to 2000 decade of coding ....
@BahaaOsman
@BahaaOsman День назад
Excellent work! Thanks. A future modification can be to add code that validates a breakout. You want to avoid fake breakouts. This can only be validated when a breakout is detected followed by a retest of the identified level then a confirmation candle in the right direction is detected. I would also add volume to the algorithm. A good breakout always occurs with strong volume
@hepsser7399
@hepsser7399 2 дня назад
where can i find the .CSV files?
@CodeTradingCafe
@CodeTradingCafe День назад
I just added a link for the data in the description, let me know if it works.
@hepsser7399
@hepsser7399 7 часов назад
@@CodeTradingCafe it worked, thank you so much!
@sc2020GR
@sc2020GR 2 дня назад
does it matter if data point is minute or day?
@CodeTradingCafe
@CodeTradingCafe День назад
Yes of course, timeframe is crucial for different strategies.
@deekshitpatel4647
@deekshitpatel4647 3 дня назад
Hello sir We can code indicators and male a strategy but can you please make a video on VOLATILITY CONTRACTION PATTERN OF MARK MIVERNI IN PYTHON
@CodeTradingCafe
@CodeTradingCafe 2 дня назад
Hi I will add it to the list, thank you for the idea.
@vipulkumarram
@vipulkumarram 3 дня назад
Great Full Tutorial Sir
@CodeTradingCafe
@CodeTradingCafe 3 дня назад
Thank you !
@punkrockerboyyy
@punkrockerboyyy 3 дня назад
where is the link?
@CodeTradingCafe
@CodeTradingCafe 3 дня назад
Hi there is a corrected version of this with the link: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-YytCoeSq30E.html
@Adrian-fi3kt
@Adrian-fi3kt 4 дня назад
It doesn't mention whether duplicates are sent in. Convert to set, then sort, then compare the first and last items could result in a quicker algorithm.
@CodeTradingCafe
@CodeTradingCafe 3 дня назад
might be worth a try, thank you!
@bongoseakhoa5092
@bongoseakhoa5092 4 дня назад
Hi Ziad, thank you for the content you put out you have had a real impact in my life focussing my passion for data science which even led to a job teaching fintech with edX. It has been amazing watching you over the past 2 years and growing my skillset I truely wish you everything great in life. Please continue producing great content! Sidenote to anyone else reading this comment never made any money with automated trading and that is mostly on me, just loved the learning part of it and still continue to.
@CodeTradingCafe
@CodeTradingCafe 3 дня назад
Great to hear! Thank you for leaving this comment. Even if you didn't make money trading you already did a lot by being consistent these last 2 years and you grew your skills for sure this is already a big win. On the other hand, medallion, renaissance technologies, the all time and space wizards of automated trading are averaging 60% returns per year, so keep this in your math if you ever wonder how good should a system be, I would say anything above 10% per year is excellent (not getting rich though :) ). I think I will have to make a video about this to raise awareness.
@gvidalcantavella
@gvidalcantavella 5 дней назад
One question, why not using Williams fractal function to automate the higher highs and higher lows?
@CodeTradingCafe
@CodeTradingCafe 3 дня назад
In this case we were not looking for higher highs with higher lows, the triangle is lower highs and higher lows, so the pattern is easily achievable with regression. In other cases we can still use the Williams fractal function but it's just a small part of the solution.
@ShaneZarechian
@ShaneZarechian 5 дней назад
incredible video
@CodeTradingCafe
@CodeTradingCafe 3 дня назад
Thank you for your support
@mavricsalvaje
@mavricsalvaje 5 дней назад
Have you built a time series pattern algorithm that checks day close to next day close, including premarket and postmarket for ES? This is not a technical pattern trading pattern like head and shoulders, etc. It's like a Stochastic signal with repeated patterns in time-series. There are about 11 repeated day trade time-series patterns. Could you look at the ES to scan repeated time-series patterns? Python would likely catch half of the signals in 60 days of real-time trading with yfinance. Timeframe would be 5 minute and 15 minutes for the time-series pattern signals.
@CodeTradingCafe
@CodeTradingCafe 3 дня назад
Hi, I think I understand what you mean, I did try time series before I also tried facebook's algorithm Prophet check this video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-lmoHsgSKBNA.html
@wangzhe5daidinnerout
@wangzhe5daidinnerout 5 дней назад
which platform can this python code run on ? ( MT5 ? )
@CodeTradingCafe
@CodeTradingCafe 5 дней назад
No, this runs on python.
@jefferystartm9442
@jefferystartm9442 5 дней назад
😮 bro , adopt me - my papers are ready
@CodeTradingCafe
@CodeTradingCafe 5 дней назад
Lol, thank you for your support.
@ShaneZarechian
@ShaneZarechian 6 дней назад
Hi, just want to say I've watched many videos about this topic and that this is the best one because you let me see the mistake in other's results that look good superficially
@CodeTradingCafe
@CodeTradingCafe 5 дней назад
Glad it was helpful! Thank you for your comment.
@trapstargangx8850
@trapstargangx8850 6 дней назад
Sir can you please code a PC Robot
@CodeTradingCafe
@CodeTradingCafe 5 дней назад
Can you be more specific? any strategy in mind?
@trapstargangx8850
@trapstargangx8850 5 дней назад
@@CodeTradingCafe I created a mobile Robot 🤖 that works on ea convertor.. so for the robot to work need to be coded into a PC Robot 🤖 so that it can work on mobiles
@CodeTradingCafe
@CodeTradingCafe 4 дня назад
All my systems work with python on PC
@trapstargangx8850
@trapstargangx8850 3 дня назад
@@CodeTradingCafe okay boss please help me code it 🙏
@vassiliscapsis5828
@vassiliscapsis5828 7 дней назад
Hi Ziad. Just watched the video and is (once again) a real gem, both for traders and coders. It has everything I wished for (lol). I hope you and your family are and stay safe
@CodeTradingCafe
@CodeTradingCafe 6 дней назад
Hey Vassilis thank you so much. So far so good for the situation hopefully it will not escalate, meanwhile we can still code :)
@2casperik
@2casperik 7 дней назад
Hi. Nice channael. Can you write a script for nadaraya watson envelope?
@CodeTradingCafe
@CodeTradingCafe 6 дней назад
Yes sure, I will try soon enough, but might take some time.
@agxgaming2327
@agxgaming2327 7 дней назад
bro you tell about best platform for learn this advance like strategy by using python and which platform is best and where how to learn all think which course is best for make this own strategy .
@CodeTradingCafe
@CodeTradingCafe 6 дней назад
Hi I have some courses on Udemy check the coupons in the description. And follow my channel :)
@RaadYacu
@RaadYacu 7 дней назад
awesome channel
@CodeTradingCafe
@CodeTradingCafe 7 дней назад
Thank you for your support!
@RaadYacu
@RaadYacu 8 дней назад
very helpful
@CodeTradingCafe
@CodeTradingCafe 7 дней назад
Glad it helped, good luck and thank you for the comment.
@SalemAdedipe-j4z
@SalemAdedipe-j4z 8 дней назад
Hello? Trust you're doing good? Good work here. Please I have a request. Been trying for months now to create an automated trading system strictly and focused on ICT model Technically ICT is wide but [ Time of the day and silver bullet strategy ] is enough for intraday trading. I really appreciate if you do something towards this two strategies No matter what method you use, I will follow as long as it works. Thank you
@CodeTradingCafe
@CodeTradingCafe 6 дней назад
Hi, thank you. I will add it to my list it has been requested before.
@juliocezardonascimento2688
@juliocezardonascimento2688 9 дней назад
Tested with recent data and unfortunately the results were not so good😞
@CodeTradingCafe
@CodeTradingCafe 8 дней назад
Parameters need to be updated every week ideally, it can still work, but grids are usually high risk.
@sarfrazniwaas
@sarfrazniwaas 9 дней назад
Hi, i have been following your strategy videos for quite long time. I have a doubt. I tested the strategy and have two results by slight change of parameters. Both are similar in terms of returns but only the draw down percentage has difference. Which one you pick is best. Equity Final [$] 169606.161181 Equity Peak [$] 169606.161181 Return [%] 69.606161 Buy & Hold Return [%] 2708.265852 Return (Ann.) [%] 0.0 Volatility (Ann.) [%] NaN Sharpe Ratio NaN Sortino Ratio NaN Calmar Ratio 0.0 Max. Drawdown [%] -11.757779 Avg. Drawdown [%] -1.85357 Max. Drawdown Duration 15591.0 Avg. Drawdown Duration 819.776316 # Trades 202.0 Win Rate [%] 50.49505 Best Trade [%] 9.480857 Worst Trade [%] -4.584625 Avg. Trade [%] 0.264254 Max. Trade Duration 208.0 Avg. Trade Duration 22.054455 Profit Factor 1.385732 Expectancy [%] 0.283124 SQN 2.032166 ********************************************************************************* Equity Final [$] 170082.355832 Equity Peak [$] 171779.073593 Return [%] 70.082356 Buy & Hold Return [%] 2708.265852 Return (Ann.) [%] 0.0 Volatility (Ann.) [%] NaN Sharpe Ratio NaN Sortino Ratio NaN Calmar Ratio 0.0 Max. Drawdown [%] -6.216913 Avg. Drawdown [%] -0.98357 Max. Drawdown Duration 8847.0 Avg. Drawdown Duration 457.862069 # Trades 82.0 Win Rate [%] 60.97561 Best Trade [%] 9.480857 Worst Trade [%] -2.258203 Avg. Trade [%] 0.651874 Max. Trade Duration 120.0 Avg. Trade Duration 21.780488 Profit Factor 2.382913 Expectancy [%] 0.66805 SQN 3.163725
@CodeTradingCafe
@CodeTradingCafe 9 дней назад
Hi I would pick the second, because the number of trades is lower this means less commissions, also the drawdown is lower, meanwhile the profit factor is much higher. Good luck.
@LolkeDijkstra
@LolkeDijkstra 9 дней назад
I tried to replicate the exact same results and found that you were using a gap window of 6 equal to the pivot window. That would do the trick. But of course you should have increased the gap.
@CodeTradingCafe
@CodeTradingCafe 9 дней назад
Hi, glad it works. Regarding the gap not necessarily check the edge conditions, in python the right edge of a slice is automatically excluded.
@Developers63
@Developers63 9 дней назад
النبي عيسى سوف ينزل في المسجد القصى و وساحته تعتبر كافية لجيشه
@CodeTradingCafe
@CodeTradingCafe 9 дней назад
No doubt... maybe... but until then I will be coding strategies :)
@Developers63
@Developers63 9 дней назад
@@CodeTradingCafe 😂😂😂😂 no this video ,i don't know how
@Dark_vibez...
@Dark_vibez... 10 дней назад
Bro tell me a quotex api please
@CodeTradingCafe
@CodeTradingCafe 9 дней назад
Hi, sorry I don't use quotex
@thinketh2408
@thinketh2408 10 дней назад
Bro one request try same on the vector bt... If you think it's good library....
@CodeTradingCafe
@CodeTradingCafe 9 дней назад
Hi, I remember promising you over a year ago a video on vectorbt and it's still on my conscience :) I know i must start using it (I fell like telling you I will start doing it as soon as possible but I am afraid to skip again lol).
@thinketh2408
@thinketh2408 9 дней назад
@@CodeTradingCafe 😅 yeah even i had also planned to start it.. Yet still have not...
@RaadYacu
@RaadYacu 10 дней назад
very helpful - thx
@CodeTradingCafe
@CodeTradingCafe 9 дней назад
Glad it helped!
@zameermohammed8324
@zameermohammed8324 10 дней назад
how can i download this software
@CodeTradingCafe
@CodeTradingCafe 9 дней назад
It's python coding, if you are not familiar with the python language it's better to just watch the videos here and focus on the results, so I do the backtesting and you can get if a strategy is good or not. Meanwhile if you are really motivated you can learn coding in python (you will need 6 months to master for trading).
@LolkeDijkstra
@LolkeDijkstra 10 дней назад
Hi, I didn't really get where you downloaded the data from. I downloaded daily data from Yahoo finance for the same period and noticed that the data is actually quite different. Could you share the source with us? Thanks in advance!
@CodeTradingCafe
@CodeTradingCafe 9 дней назад
Hi, you can try Dukascopy, or your broker.
@ezequielperez5724
@ezequielperez5724 10 дней назад
Very good analysis. But you cannot consider a statistically robust model with only 80 events! Minimum 1000, optimal 2500, ideal 10,000, at that point, all the indicators you have used stop being profitable. You may have taken small segments, which randomly, give positive returns with 80 events. Like when you toss a coin, at one point you may get 80 heads in 100 attempts, but in the long run, 10,000 events, it will be 50/50. That is why robustness is necessary in the analysis. I invite you to do the backtest in H4 over a period of 20 years for 10 assets, with your programming capacity you can do it and there the commercial indicators perish. You have to look for other "little things" to be profitable, which is clearly possible! Great work colleague!
@CodeTradingCafe
@CodeTradingCafe 10 дней назад
Hi, thank you. I agree statistically 80 events are still short somehow. But at the same time the test was on 7 assets and I think around 7 years each. So that's a lot of candles already I assume I could include cryptos and stocks and increase this to around 300 events max considering the data. Now about using the strategy on the 4H timeframe I am not sure it would still work as well simply because a daily rejection is stronger than a 4H rejection. What do you think?
@ezequielperez5724
@ezequielperez5724 10 дней назад
If the statistical advantage exists, it should be able to be expressed in any time frame, from W1 to M1. Considering that the shorter the time frame, the greater the impact of commissions, the model must be balanced in that direction for it to be profitable. Another way to check if this combination of indicators you used works is to measure it in the number of suitable events, 2500, for which you should include about 220 assets, taking into account that if you filter, and that number drops to 600 events for example, you are still short of events, and you should re-measure that new filtered scenario in more products. Perhaps in the end you will end up with a portfolio of 700-1000 assets and its operation, if it is not completely automated, I doubt it can be done.
@kazutokirigaya6820
@kazutokirigaya6820 10 дней назад
Do these strategies work on daily candles, i use a simple strategy using bbands and vwap, it's profitable but showing only 5-6 trades in a year for one stock. I am thinking of selecting 10 stocks. What do you suggest, will this many signals normal when using daily candles?
@CodeTradingCafe
@CodeTradingCafe 10 дней назад
Hi, yes I agree some good selective signals are not as frequent you can run the same strategy on let's say 20 assets in parallel so you get more signals. For sure you need to backtest it first. Just one thing using VWAP on the daily timeframe you might need to adjust the volume reset duration.
@artnone1257
@artnone1257 10 дней назад
How about crypto currencies? Is that indicator gonna work well with them? I want to to try similar strategy with multiple crypto assets
@CodeTradingCafe
@CodeTradingCafe 10 дней назад
Hi, you can try it, I actually could involve some crypto in coming videos, might be interesting.
@rotherhiteboy
@rotherhiteboy 11 дней назад
What software and broker are you using?
@CodeTradingCafe
@CodeTradingCafe 10 дней назад
I use python, with VSCode for the coding interface. Broker is Oanda for testing the strategies using their python API for live trading.
@rotherhiteboy
@rotherhiteboy 10 дней назад
@@CodeTradingCafe are you using the oanda's trading platform?
@rotherhiteboy
@rotherhiteboy 10 дней назад
@@CodeTradingCafe are you using the oanda's trading platform?
@CodeTradingCafe
@CodeTradingCafe 9 дней назад
Yes for Python strategies testing
@LoOP-oi4qm
@LoOP-oi4qm 11 дней назад
this channel is a gem
@CodeTradingCafe
@CodeTradingCafe 10 дней назад
Thank you so much!
@bertstroobant6020
@bertstroobant6020 11 дней назад
Anyone has some good documentation about simulated annealing for financial data. Been reading some thesisses about the subject but no in depth information
@CodeTradingCafe
@CodeTradingCafe 10 дней назад
Hi, this is a challenging topic, it's possible to conquer but the questions is always is it worth the effort"? what do you think?
@bertstroobant6020
@bertstroobant6020 10 дней назад
@@CodeTradingCafe i would say it's worth the effort. You will (very likely) have no positive result but the knowledge, the way if thinking you learn during your research is possible worth more than the result.
@CodeTradingCafe
@CodeTradingCafe 9 дней назад
I agree with this, plus I learned that "you never really know" sometimes we can be surprised.
@nandoribas
@nandoribas 11 дней назад
Realy good work, nice video.
@CodeTradingCafe
@CodeTradingCafe 10 дней назад
Thank you very much! Glad you liked it.
@nkwebikarome4764
@nkwebikarome4764 11 дней назад
💥
@CodeTradingCafe
@CodeTradingCafe 10 дней назад
Thank you for your support.
@haass...9065
@haass...9065 11 дней назад
Saw this live 🔥🔥
@CodeTradingCafe
@CodeTradingCafe 10 дней назад
Thank you for your support
@ROSE-bk6kt
@ROSE-bk6kt 11 дней назад
what was the interval ?
@CodeTradingCafe
@CodeTradingCafe 10 дней назад
Hi, can you be more specific, is the interval meaning the timeframe?
@ROSE-bk6kt
@ROSE-bk6kt 10 дней назад
@@CodeTradingCafe yes sir
@CodeTradingCafe
@CodeTradingCafe 9 дней назад
Well usually higher timeframes are easier to deal with like daily timeframe, if you apply to lower timeframes it's more difficult especially if you include commissions.
@agxgaming2327
@agxgaming2327 11 дней назад
bro you can talk about how to create strategy in Indian stock market because this market always (new days) show gap Up and gap Down so you tell about how to create strategy code in Indian stock market 😐
@CodeTradingCafe
@CodeTradingCafe 11 дней назад
Hi, I have no experience in the Indian market I wouldn't know what's best, you can adapt any of my codes to the asset of your choice though, it might work.
@agxgaming2327
@agxgaming2327 11 дней назад
@@CodeTradingCafe ok thanks 😊
@MexxProtect
@MexxProtect 12 дней назад
I used bitwise comparison in python with a complete array for O(n) time complexity
@CodeTradingCafe
@CodeTradingCafe 12 дней назад
bitwise is competitively good, I didn't think of it, thank you
@streamcutthemoffbyswaygo
@streamcutthemoffbyswaygo 12 дней назад
at 7:20, what is the other applied function behind get_slope?
@CodeTradingCafe
@CodeTradingCafe 12 дней назад
Hi, you can download the jupyter notebook file from the link in the description, the code is there (I honestly don't remember what was after the function :) )
@streamcutthemoffbyswaygo
@streamcutthemoffbyswaygo 11 дней назад
@@CodeTradingCafe Hi, thank you so much! - MASSIVE help! :)