I appreciate a lot your content. The snippet that evaluate uptrend or downtrend is very slow, I've refactorized it removing loops and now is very fast. I share my update. Thanks for your effort and strategies. Alex. df['Max_Open_Close'] = np.maximum(df['Open'], df['Close']) df['Min_Open_Close'] = np.minimum(df['Open'], df['Close']) df['upt'] = 1 df['dnt'] = 1 df.loc[(df['Max_Open_Close'] >= df['VWAP']), 'dnt'] = 0 df.loc[(df['Min_Open_Close']
I was able to archive 3000% in return with this algorithm and some improvements in the parameters for Bitcoin 5m chart data, backtested from Jan 2022 until today.
@@troygomez4089 just adjusted the parameters: rsi length: 16 bbands length: 15 bbands std: 2.0 back_candles: 26 total signal buy below rsi: 46 total signal sell above rsi: 59 atr index: 7 slatr: 1.2 tpsl_ratio: 1.89 close long above/equal rsi: 90 close short below/equal rsi: 10
@@troygomez4089 also had a typo ... used BBL instead of BBU to confirm the total sell signal... but correcting it decreased the success in return and win rate ... I guess the other parameters would have to be optimized again - although still 1300% return
Thank you for this video ! I began algo trading 1 year ago and your video helped me a lot. Seeing a scalping video on your Chanel is very cool, because there are no big ressources on scalping strategies that are reliable on UA-cam and the internet in my opinion, so thank you !
Hi, thank you for your comment. Indeed I didn't want to make scalping video at first because it's challenging the data has too much noise, but this was requested so many times, and I think the VWAP is really good and also the BBands help define a good entry point. Good luck to you! (actually it has been a while I haven't looked into lower timeframes maybe I will revisit scalping soon).
at minute 10:37, To verify that entry below the VWAP, perhaps you could calculate the difference between the VWAP and the Bollinger line, and from there if it passes a percentage it is taken as valid. And maybe a bit more complicated to verify the sail in major or minor frames, and see a confirmation there... Or adding more indicators like the MACD, EMA, or volume. In addition, support or resistance could be taken into account (later video), or Wickokff accumulation zones, distribution zones, doing nothing at market openings (a lot of volatility), perhaps it could improve performance
Support and resistance levels are crucial, I agree and the trading time wasn't included yet so trades are opened anytime the market is opened this can be improved definitely.
@@CodeTradingCafe I use volume data to confirm signal above or below vwap. I want to see heavy buying or selling volume moving the price action in relation to time. I use at least 2 or 3 time scales on the chart such as (1, 5, 10, 15, daily). I only focus on trading 1 stock/product at a time and get to know how it moves and try to understand the time frames that larger investors make their trades. It's always interesting to see how light volume moves the price after these heavier volume periods. Everything you discussed in this video is pretty similar to the strategy I use to scalp with.
First of all let me congratulate you for such amasing explanation and presentation. You explain very complex concepts of financial indicators and programming in only 15 minutes, that is spectacular. It will be very interesting to add some market sentiment analysis using Python to find news that impact stock price.
Thank you for your supportive comment. Sentiment analysis is on my list at least to show how it can be implemented, the only challenge is that you never know when the sentiment will be reflected on the market in a day, a week or more, but I think this is something we can discuss when I make the video. Have great new year!
Great video mate, thanks. I am not a coder, but I try, with what I have learnt, to get an Algo that works. I am now a follower and look forward to learning more.
Hey! You can optimize parameters with methods like differential evolution. I'm not sure if that will do better but you can give it a try. Great video as always.
I'm just getting into algo trading, no algorithm deployed yet but thats such a great video thank you! There is not much information available regarding scalping so thankful your channel exists!
Glad it was helpful! and thank you for your support. Please keep in mind this backtest doesn't include commissions so the trade management part need to be human controlled. On the other hand scalping is way more difficult to automate than higher timeframes... in my opinion but I might be wrong. Good luck!
If you have time to do hybrid trading, meaning an algorithm will detect patterns and send you notifications but then the trading is done manually you might reach 5% monthly with good trade and risk management, but this requires a lot of waiting time as well.
simple but decent strategy. getting => 22% Net Profit / 70% Profitable / 4% Drawdown on BTC/USD 5min TF. I'm using SL x2 and TP x1.5 and a cross above of the lowerband for a long position and vice versa
Your videos are incredible, I'm going to review them all, I'm new, I just saw the first video today, sorry if I don't write very well, it's that I speak Spanish and English is not precisely my strong language and you could use a weighted moving average of 150 and 300 to see trends.
This is very good. Please bring more scalping and intrday strategy backtest. Can you please add a initial capital, so that we can see how much a particular amount will grow.
I will try but lower timeframes are more challenging for coding it's much easier on daily timeframes, but yes I will keep this ongoing see if we can sort a nice strategy
Great content! Btw you can do the "VWAP Signal" calculation vectorized instead of iteratively so that it takes less than a second instead of the few minutes that takes in your code: downtrend = df[["Open", "Close"]].rolling(backcandles).max().max(axis=1) < df.VWAP, # if the highest candle body is below vwap then all candles in the rolling window are below vwap uptrend = df[["Open", "Close"]].rolling(backcandles).min().min(axis=1) > df.VWAP # if the lowest candle body is above vwap then all candles in the rolling window are above vwap
Hi thank you for sharing this, actually yes we can vectorize most of the computed values. But just for the sake of this discussion, sometimes if you are streaming for a live trading bot it's easier to have a function to call for each candle (can't explain clearly in the comment only in some particular cases of live trading it works better this way, but definitely slower).
@CodeTrading Ah yeah I understand, you get a live feed candle by candle, and you want to pass to a function only the last n candles to calculate just the very latest vwap signal. Anyways, for anyone that wants the vectorized form for doing parameter optimization, I finally came up with the solution: downtrend_mask = df[["Open", "Close"]].max(axis=1).lt(df["VWAP"]).rolling(backcandles+1).sum().eq(backcandles+1) uptrend_mask = df[["Open", "Close"]].min(axis=1).gt(df["VWAP"]).rolling(backcandles+1).sum().eq(backcandles+1) df['VWAPSignal'] = 0 df.loc[downtrend_mask, "VWAPSignal"] = 1 df.loc[uptrend_mask, "VWAPSignal"] = 2 --- The +1 after backcandles is to count the current row AND n backcandles (same effect as what is done in the iterative version done in the video/jupyter)
@@CodeTradingCafe Today I learned that you can just add the decorator @njit from the numba library to your function and will probably run faster than my complicated vectorized stuff. Might need to pass the pandas columns as numpy arrays but @njit takes the iterative loop, does just-in-time compilation of it and efficiently executes it, and can do it in a vectorized way
thx bro for this great video as usual, can i understand more the purpose of close trades when RSI >= 90 or RSI < =10. if len(self.trades)>0: if self.trades[-1].is_long and self.data.RSI[-1]>=90: self.trades[-1].close() elif self.trades[-1].is_short and self.data.RSI[-1]
Hi, yes we close the trade if the rsi goes above 90 for long positions and below 10 for short positions, since the rsi will show the overbought and oversold ranges of an asset.
Thank you for very good video. To identify the type of trend, the following condition can be replaced, if the price is higher than ATR in 80% of the past candlesticks, for example, it can be concluded that the price is bullish.
Was watching some of your videos today on detecting triangle and channel patterns so nice to see videos on this topics. Maybe you could also do a future video on harmonic pattern detection.
Great content as usual. Definitely expand more on the strategy. Question: have you integrated your Python code with some trading platform? I mean, the code shows whether to buy or sell, but how the actual act of buying/selling is happening? Is it automated and Python does it for you or you do it manually based on the results of your code?
@@thinketh2408, I see. So, first and foremost, the trading platform I am using should be allowing (providing api). Only then I can automate the process via building/using a trading bot.
Yes it depends on the platform they usually provide a python interface that you can add to your program and automate the trading process, I have an old video on this using oanda s API.
I would maybe include and define a feature that identifies range days since after range days we could expect bigger movements. Love the content. Thanks
Interesting but, For my strategy list, I would BUY when RSI first time cross over 55 and reverse to sell when first time cross below 45 on day/week chart.
hi, first i want to thank you for your content is extremely educative... looking forward for a simple TrendLine Breakout Detection or TrendLine Touch Bounce....
I am working on Exponential Moving Average indicators backtesting with 8 period 13 period and 21 period. 8 period crossover with 21 period and their spread will indicate whether the trend is strong or not.
Hi I really liked your videos. I wanted to know how can we determine which option to buy at which strike price after getting a positive signal. Please do make a video on that too
Mate, you are doing an amasing job, an exceptional contribution to the trading and programming fields. My infinite gratitude for your contributions. Is there any way to contribute economically to your channel? God bless you.
Much appreciated! thank you. There is a join button next to the subscribe one, but you don't have to... mostly enjoy the content, share ideas and trade safe :)
Hello. I found something, but not the easy way. Try this as an entry point. use in strips length 20 and std 2.5 . This will show both the highs and lows that can be support and resistance at 0 and 1. data['HZ'] = (data['close'] - data['BBL_20_2.5'])/(data['BBU_20_2.5'] - data['BBL_20_2.5'])
Excellent video and thx for the code. Be great to see you test on say 80% of the sample data and then run it without adjustment on the remaining 20% to simulate real time trading.
Thank you for your support, you are right ideally we can fit on 2 month and trade one week for example, then slide our fitting window for a new trading period, I will include this in one of my future videos.
Thanks for helping me to learn the backtesting strategies. I just want to know how to use bactesting optimize function(bt.optimize) for this custom startegy. So that we can get better results. Your help is much appreciated. Thanks
you're a gem, thank you for the generosity. I will sign up for your course. my friend with 811 trades you really should include commissions and/or a minimum spread. did I miss where you have this set?
Hi in this video commissions and fees were not included, I was testing the indicator, usually for slower timeframes it's easier to get away with it even if fees are relatively high.
thank you very much for your fantastic work for free for your subscribers. If you can add the divergence I think the winning ratio will increase a lot. thank you
Hi, depending on how much risk you want to take, you can have extra safe strategy but only 1 percent return per month or very high risk and more return. All the parameters will change accordingly.
@@CodeTradingCafe thanks mate... I wanted to know you preference regarding this... Like what should be the minimum sharpe ratio and maximum draw down before you start using the strategy for real trading...
Your work and you both are great! I loved all your videos, it is amazing. I feel like I am Fan of you. Quite impressed (obviously the work) but looking at the replies more impressed. Hates off!!
Trying to play around with the project. Very well done. I can't seem to figure out how to correctly compinsate for a commission of something like 0.5%. You would need to add it to the backtest init as 0.005, but then the buy and sell sl and tp values does not calculate correctly. Can anyone please point me into the right direction? Or is it just that the fees would kill you quick?
Hi, I have to recheck how backtesting library is calculating the commission fees when we use for example 0.005 (the parameter in the backtesting function we are using), so far I didn't include the fees because I wanted to show indicators effects and compare among different indicators combinations.
Yes robustness must be tested as well to find the best parameters set, it's a start base as it seems. Usually scalping strategies are hard to tune I was happy with this one.
Hello, thanks for video!! Please help me with the bt.plot, I have this error : ValueError: Length of values (2) does not match length of index (1) Do you know about that? thanks
it seems that you are trying to plot data with only 2 values and 1 index value, I don't where the mismatch is coming from, are you sure bt.run() completed successfully?
I also have the same problem, after run 'bt', it shows results, but after line bt.plot(show_legend=False) it shows error: " Data contains too many candlesticks to plot; downsampling to '1H'. See `Backtest.plot(resample=...)` ..... (many lines) ValueError: Length of values (2) does not match length of index (1)
Hi, thanks a lot for sharing this profitable strategy and I have a question about Max Drawdown Duration, it is 280 days right? I think it is actually 280 canldes which means in 5M time frame it is about one day , and because the default of backtesting module is 1Day time frame it calculate each candle as a day. Am I think correctly or not?
Hi, actually it is in days, and yes it's a lot but the test was on 3 years I think. So the system might work for a year then stop working for a while or so.
You are using Ask data only. Impact of Bid price ??? Can be massive. You need to use both bid and offer data for actual trades unless you are buying at market only.
I agree, this is just to compare indicators performance rather than a full strategy, if you are keen to add spread into this a quick way is to apply a 2/1000 commission rate, it accounts for spread (but not for commissions that are broker dependent). Thank you for your comment! Good luck!
i am new to trading and technical analysis. i wanted to understand if this strategy will work better in sideways markets or trending markets? In general, when should we go for scalping and when momentum? which indicators are best to find momentum
Hi, this particular strategy is good for trending markets it catches a good entry point using the bollingers. The rest is a lot more complicated to be discussed in the comment, it depends on your trading personality.
Hi, thank you, I haven't tested the robustness of this strategy yet, I must say it's easy to get lost in the numerous ways one can trade and always trying to choose the best.
Hello, i have a question. In Forex market, in my case, lotsize is 100000(doesn't matter the money), i have 1:30 leverage i can buy 0.03 of a instrument. How can i transpose those data in my backtesing strategy ? Btw Thanks a lot for your content.
Hi, thank you for your support. You can use the backtesting package to buy size lot 3000 this 0.03 and when backtesting pass the margin parameter as margin = 1/30 this will run the backtest in your conditions.
So if we are checking the VWAP and STDV, if something is above 2 STDV, then by definition, it is above VWAP. So, why check both? Maybe I am confused about the calculation, but this should be true if STDV is calculated from VWAP. Maybe if it is from regular average, then it could be different. Let me know your thoughts.
Hi, you have a good point! the stdv is computed from the moving average, but also the VWAP is used to test if consecutive candles are above or below the curve, the stdv is used only on the current candle. I hope it's a bit clearer.
Hi, thank you for your support, my data is rom yfinance or dukascopy (free data), you can also download from your broker. I will make a video maybe this week showing how to download data, I am getting this question a lot, so probably worth it :)
Hi, at the time I moved to Python I was chasing machine learning which Python offered in large libraries with so many shiny choices... and I simply stayed with Python :)
Another good video to give me some new trading ideas ! Instead of using the VWAP maybe you can use the 200 EMA to confirm buying above or selling below, if the price breaks the lower Bollinger Band ?
Hi, well it's kind of easy simply comment the lines where sell positions are opened and erase the SL TP from the function, but how will you backtest this if it never closes a position
@@CodeTradingCafe To close the position use another indicator, why i don't use SL and TP because after so many tests me and my best friend the 'AI' 😅 we find out that it's not good to use it, """ I don't encourage anyone not to use SL and TP, do your own research and testing , good luck 🤗 """, i use several vwap z-score indicators and other indicators like sma cross for example to open or close the position I try to do it with the backtest library and I don't have the same result with my back_test script.
Hi, great video, I did not know that backtesting, it is quite intuitive and easy to interpret. With CFDs or forex, how would you do the backtesting? because you have ask and bid data, in addition to the spread which is dynamic? And this backtesting would support hedging? i.e. if for example I open the position, and 90% of the way I want to move the stop loss to cover profits, that could be done?
Great that you liked these videos. Yes the spread can be included as 2/1000 commission (depending on broker and asset) it's not very dynamic but the approximation is ok. And yes you can apply hedging using backtesting I did it in one of my recent videos on trading the grid system where we buy and sell 2 positions at the same time.
Thank you so much for providing the wonderful strategy could you please confirm is it going to work on options trading in any instrument in Indian market
Hi thank you for your support, there is only one way to find out ... Backtesting, and it might need some parameters tuning depending on the traded asset. Good luck!
Yes, can it be testede for a longer time than 3 years? Let's say 10? 🙂 I like all your videos and the format. Do not expectet to trade - but the codex is very interesting. Can you consider adding a video about ruining Python code on a demo accout from a broker? Stocks/forex?
Thank you for your support! yes it works on any chart because it purely technical, but the results might be different, and you definitely have to tweak the parameters.
Hi, thank you for your support, the classes are from a package called backtesting py you can install it using pip install backtesting and their web documentation is on git kernc.github.io/backtesting.py/ I hope this helps, Good luck!
Great video bro, ❤ from 🇮🇳 Thank you for the effort, Suggestion : Can you make a video using PyQt and Plotly. I mean we can plot the dat using plotly and should render in pyqt window, in this windows we can change meteics like SL, TP, different stock instruments, start data end date and so many other things, so that we dont to change manually and it will very interactive
Thanks for your nice content 👍... can you please tell me which is the best scalping strategy in your opinion and you are personally using ... this will be very appreciated
My favorite is using VWAP and wait for the price to bounce on after completed retracement, 5min or 15 min timeframe (I prefer 5 min) but in general I avoid scalping it's tiring for me, I start making mistakes after 1 hour of scalping.
I read your response that the annual profitability of some of these strategies varies by 8-14%. You mentioned again a concept of instead deploying the algorithm but using it for entry signals which calls for more work. Do you imply the profit percent will be higher if we use these algorithms for entry signals only? if so what would be the approximate return percent if we use these algorithms for signals?
Hi, yes if you use these algorithms just for signaling, but then you as a human trader validate or reject the entry signal, plus you manage the trade manually you will get better results (around 25% annual, only my estimation other traders might be better and provide 50% or more... not me). So basically the algorithms are only here to do the waiting on your behalf and when the pattern is detected it becomes your job to trade.
If would be good if you add pendind stop and limit positions, but for accounts > $1000, and to close positions just with % can be 1% or 2%, I have a working robot in mql4, but I only looking for best entries not even using SL or TP, so as mentioned just % reached, I've watching many videos from you really great videos, I love to code python as well and to find the best indicators tips and adjustments keep it up thank you.
Hi thank you for sharing, yes I agree with you actually I haven't introduced any proper trade management yet in these videos, I will get something ready showing the different ways of closing a trade, your percentage idea is also a good one! Good luck!
In a strategy ive back tested ive managed to get 3.14 sharpe ratio, i heard if its too high youd need to be careful? My startegy is High frequency trades so the commission is rediculous when i factor it in... Which reduces the sharpe ratio quite alot - how can I reduce commission costs?
You can check if your broker has low commission accounts, or look for a different broker for this. Some brokers offer no commission trading as long as you don't leave trades opened overnight. But spread will always be there.
It depends where you are located, different places have different rules for brokers, I know in the Middle East for example CFI have no overnight commissions on Forex, just an example, Oanda have different types of accounts with different fees but come need a minimum deposit amount.
hi there. I would like use Bollinger Bands and consider "lenght" and "stdev" as variables to be used within the optimization function. have you got some solving answer?!??!?! pllsssssss
It's relatively simple but the problem you will have to deal with the names of the Bollinger columns created by pandas_ta for each set of parameter. Other than that putting everything into functions and calling an arching function to execute all the files can work well.
Good morning, greetings from Venezuela. I'm starting to watch your videos and they are phenomenal... what does this code work with thanks for the support
Hi thank you for your comment, this is python notebooks so you need jupyter notebook installed, try installing anaconda (see my very first video of this channel)
@@CodeTradingCafe great bro, you just gained a subscriber and python student. where I enter the broker's data to do the tests, thank you very much. Greetings from Venezuela
Hi, Is there a possible to consider commission's fee for Trading bot? For example 2% or 0.1% because some of the Broker's have Commission's fee and It's very important to consider this fee. It's a great concept. I would like to see in future how to connect this bot to Broker's platform with API. Thanks,
Sure it's possible to add fees, backtesting library can do this but I don't know how it's counting fees in the background, or we can do it manually as well. Connection with the broker... I have to make a new video about it, in the meantime check this one ua-cam.com/video/e1Ut4Iap10M/v-deo.html
I appreciate a lot your content. The snippet that evaluate uptrend or downtrend is very slow, I've refactorized it removing loops and now is very fast. I share my update. Thanks for your effort and strategies. Alex.
df['Max_Open_Close'] = np.maximum(df['Open'], df['Close'])
df['Min_Open_Close'] = np.minimum(df['Open'], df['Close'])
df['upt'] = 1
df['dnt'] = 1
df.loc[(df['Max_Open_Close'] >= df['VWAP']), 'dnt'] = 0
df.loc[(df['Min_Open_Close']
Thanks a lot for your input, the code looks nice, I will pin your comment for other viewers in case they need the improved version.
hi im newbie for python. would you help me where input this code? thanks much!
can you help for me how i can replace these code? I think I place the wrong place and it crashed
@@tamaspete8299 # Determine VWAP signals
for row in range(backcandles, len(df)):
upt = 1
dnt = 1
for i in range(row - backcandles, row + 1):
if max(df.Open.iloc[i], df.Close.iloc[i]) >= df.VWAP.iloc[i]:
dnt = 0
if min(df.Open.iloc[i], df.Close.iloc[i])
@@tamaspete8299 chek the dependencies of your python
I was able to archive 3000% in return with this algorithm and some improvements in the parameters for Bitcoin 5m chart data, backtested from Jan 2022 until today.
Thank you for your feedback, just be careful with the drawdown keep it on your radar.
👌 Did you add technical indicators or just adjust the values for the given tis?
@@troygomez4089 just adjusted the parameters:
rsi length: 16
bbands length: 15
bbands std: 2.0
back_candles: 26
total signal buy below rsi: 46
total signal sell above rsi: 59
atr index: 7
slatr: 1.2
tpsl_ratio: 1.89
close long above/equal rsi: 90
close short below/equal rsi: 10
Thank you for sharing
@@troygomez4089 also had a typo ... used BBL instead of BBU to confirm the total sell signal... but correcting it decreased the success in return and win rate ... I guess the other parameters would have to be optimized again - although still 1300% return
i have no words how to express my gratitude for this channel . Really your every video is making a change in my journey of algo trading .
Thank you for your supportive comment, it's nice to know and very encouraging! Good luck!
Thank you for this video ! I began algo trading 1 year ago and your video helped me a lot. Seeing a scalping video on your Chanel is very cool, because there are no big ressources on scalping strategies that are reliable on UA-cam and the internet in my opinion, so thank you !
Hi, thank you for your comment. Indeed I didn't want to make scalping video at first because it's challenging the data has too much noise, but this was requested so many times, and I think the VWAP is really good and also the BBands help define a good entry point. Good luck to you! (actually it has been a while I haven't looked into lower timeframes maybe I will revisit scalping soon).
Hi Bro,
I want you use Algo trading please let you guide me..
at minute 10:37,
To verify that entry below the VWAP, perhaps you could calculate the difference between the VWAP and the Bollinger line, and from there if it passes a percentage it is taken as valid.
And maybe a bit more complicated to verify the sail in major or minor frames, and see a confirmation there...
Or adding more indicators like the MACD, EMA, or volume.
In addition, support or resistance could be taken into account (later video), or Wickokff accumulation zones, distribution zones, doing nothing at market openings (a lot of volatility), perhaps it could improve performance
Support and resistance levels are crucial, I agree and the trading time wasn't included yet so trades are opened anytime the market is opened this can be improved definitely.
@@CodeTradingCafe I use volume data to confirm signal above or below vwap. I want to see heavy buying or selling volume moving the price action in relation to time. I use at least 2 or 3 time scales on the chart such as (1, 5, 10, 15, daily). I only focus on trading 1 stock/product at a time and get to know how it moves and try to understand the time frames that larger investors make their trades. It's always interesting to see how light volume moves the price after these heavier volume periods. Everything you discussed in this video is pretty similar to the strategy I use to scalp with.
First of all let me congratulate you for such amasing explanation and presentation. You explain very complex concepts of financial indicators and programming in only 15 minutes, that is spectacular. It will be very interesting to add some market sentiment analysis using Python to find news that impact stock price.
Thank you for your supportive comment. Sentiment analysis is on my list at least to show how it can be implemented, the only challenge is that you never know when the sentiment will be reflected on the market in a day, a week or more, but I think this is something we can discuss when I make the video. Have great new year!
Great video mate, thanks.
I am not a coder, but I try, with what I have learnt, to get an Algo that works. I am now a follower and look forward to learning more.
Probably one of the most rewarding/satisfying comments! Glad I could help! Good luck!
Hey! You can optimize parameters with methods like differential evolution. I'm not sure if that will do better but you can give it a try. Great video as always.
Thank you for your support! You're right it is worth trying an optimization see what it gives, I am not sure how much improvement there will be.
I'm just getting into algo trading, no algorithm deployed yet but thats such a great video thank you! There is not much information available regarding scalping so thankful your channel exists!
Glad it was helpful! and thank you for your support. Please keep in mind this backtest doesn't include commissions so the trade management part need to be human controlled. On the other hand scalping is way more difficult to automate than higher timeframes... in my opinion but I might be wrong. Good luck!
@@CodeTradingCafe how much can you realistically get in return using longer timeframes?
Around 8-20 % per year all costs included (my experience, but maybe other algo traders do better)
@@CodeTradingCafe damn not as much as I thought. I thought it would be like 2-5% per month at least. Thanks for your insight tho!
If you have time to do hybrid trading, meaning an algorithm will detect patterns and send you notifications but then the trading is done manually you might reach 5% monthly with good trade and risk management, but this requires a lot of waiting time as well.
Great content! Perfectly synchronised with my current experiment
Happy you liked it, I like the vwap recently it's a nice indicator
simple but decent strategy. getting => 22% Net Profit / 70% Profitable / 4% Drawdown on BTC/USD 5min TF. I'm using SL x2 and TP x1.5 and a cross above of the lowerband for a long position and vice versa
Thank you for sharing, it's nice to know how it works on different assets. Good luck!
Hello, may I kindly speak to you
Your videos are incredible, I'm going to review them all, I'm new, I just saw the first video today, sorry if I don't write very well, it's that I speak Spanish and English is not precisely my strong language and you could use a weighted moving average of 150 and 300 to see trends.
Hey, thank you for your comment, I will try weighted moving average see how it goes. Good luck!
Fist at all thank for all your content, super great, Keep it up!!.
I checked Microsoft (5 min), doesn't look good:
Start 2022-07-15 09:30:00
End 2022-10-12 15:55:00
Duration 89 days 06:25:00
Exposure Time [%] 1.750102
Equity Final [$] 80.747453
Equity Peak [$] 102.614197
Return [%] -19.252547
Buy & Hold Return [%] -12.418022
Return (Ann.) [%] -57.487629
Volatility (Ann.) [%] 28.451232
Max. Drawdown [%] -31.08406
Avg. Drawdown [%] -31.08406
Max. Drawdown Duration 84 days 03:00:00
Avg. Drawdown Duration 84 days 03:00:00
# Trades 17
Hi thank you for the update, it might need some tuning, mainly the SL TP ratio and SL position, it should be fine for some set of parameters.
Before testing other parameters, try m1 candles to m30 and see which one yields the most win rate, very good content btw , cant wait for an update
Thank you, yes I was thinking m15 might be a good candidate... There only one way to find out
This is very good. Please bring more scalping and intrday strategy backtest. Can you please add a initial capital, so that we can see how much a particular amount will grow.
Thank you for your comment, don't forget that fees were not included here so initial capital might not be very accurate
@@CodeTradingCafe Thanks for replying. Will you consider making more videos on intraday and scalping strategy
I will try but lower timeframes are more challenging for coding it's much easier on daily timeframes, but yes I will keep this ongoing see if we can sort a nice strategy
Great content! Btw you can do the "VWAP Signal" calculation vectorized instead of iteratively so that it takes less than a second instead of the few minutes that takes in your code:
downtrend = df[["Open", "Close"]].rolling(backcandles).max().max(axis=1) < df.VWAP, # if the highest candle body is below vwap then all candles in the rolling window are below vwap
uptrend = df[["Open", "Close"]].rolling(backcandles).min().min(axis=1) > df.VWAP # if the lowest candle body is above vwap then all candles in the rolling window are above vwap
actually my code would only look at 1 vwap value for each window, but surely there is another way to do it right
Hi thank you for sharing this, actually yes we can vectorize most of the computed values. But just for the sake of this discussion, sometimes if you are streaming for a live trading bot it's easier to have a function to call for each candle (can't explain clearly in the comment only in some particular cases of live trading it works better this way, but definitely slower).
@CodeTrading Ah yeah I understand, you get a live feed candle by candle, and you want to pass to a function only the last n candles to calculate just the very latest vwap signal.
Anyways, for anyone that wants the vectorized form for doing parameter optimization, I finally came up with the solution:
downtrend_mask = df[["Open", "Close"]].max(axis=1).lt(df["VWAP"]).rolling(backcandles+1).sum().eq(backcandles+1)
uptrend_mask = df[["Open", "Close"]].min(axis=1).gt(df["VWAP"]).rolling(backcandles+1).sum().eq(backcandles+1)
df['VWAPSignal'] = 0
df.loc[downtrend_mask, "VWAPSignal"] = 1
df.loc[uptrend_mask, "VWAPSignal"] = 2
---
The +1 after backcandles is to count the current row AND n backcandles (same effect as what is done in the iterative version done in the video/jupyter)
@@CodeTradingCafe Today I learned that you can just add the decorator @njit from the numba library to your function and will probably run faster than my complicated vectorized stuff. Might need to pass the pandas columns as numpy arrays but @njit takes the iterative loop, does just-in-time compilation of it and efficiently executes it, and can do it in a vectorized way
@@lautaa33 Hey thanks, I didn't know this, have to check it out!
Great work. Please continue
Thank you for your support and encouragement 🙂
thx bro for this great video as usual, can i understand more the purpose of close trades when RSI >= 90 or RSI < =10.
if len(self.trades)>0:
if self.trades[-1].is_long and self.data.RSI[-1]>=90:
self.trades[-1].close()
elif self.trades[-1].is_short and self.data.RSI[-1]
Hi, yes we close the trade if the rsi goes above 90 for long positions and below 10 for short positions, since the rsi will show the overbought and oversold ranges of an asset.
Thank you for very good video. To identify the type of trend, the following condition can be replaced, if the price is higher than ATR in 80% of the past candlesticks, for example, it can be concluded that the price is bullish.
Hi, thank you for sharing, but the ATR is always below the price value, it's just the range, can you be more specific?
Amazing video. Keep up the good work
Thank you for your support 😊
Was watching some of your videos today on detecting triangle and channel patterns so nice to see videos on this topics. Maybe you could also do a future video on harmonic pattern detection.
Thank you for your comment, harmonics are not reliable, just my opinion (and my experience) but I might be wrong.
Great content as usual. Definitely expand more on the strategy. Question: have you integrated your Python code with some trading platform? I mean, the code shows whether to buy or sell, but how the actual act of buying/selling is happening? Is it automated and Python does it for you or you do it manually based on the results of your code?
@@thinketh2408, I see. So, first and foremost, the trading platform I am using should be allowing (providing api). Only then I can automate the process via building/using a trading bot.
Yes it depends on the platform they usually provide a python interface that you can add to your program and automate the trading process, I have an old video on this using oanda s API.
@@CodeTradingCafe , thx for the reply. I will definitely check it out!
@@dxtrmst_FutureMusic I think it is being rejected when spread is high
@@CodeTradingCafe suggest
I'm completely newbie 😌 thanks so much
Thank you and good luck with your coding!
Lovely video as usual!
Thank you for your support!
great work boss,, keep them coming
Thank you much appreciated!
I would maybe include and define a feature that identifies range days since after range days we could expect bigger movements. Love the content. Thanks
Thank you for sharing. I agree, there strategies working on range days and break outs, working on one right now I will try and put it in a video.
nice job, I learned so much from you. Thanks
Thanks for watching! and for your support!
One suggestion for a future video, Detect Fair Value Gaps and implement a strategy (ICT) based on it.
Hi thank you, I will look into this for the coming year.
Thanks for the video, Great Content. Waiting for your complete automated trading course including live trading in udemy !!!.
Thank you for your support ! Glad you enjoy the learning process.
very awesome thank you for your coin test
Hey, thank you for your constant support, glad the vid is helpful
Interesting but, For my strategy list, I would BUY when RSI first time cross over 55 and reverse to sell when first time cross below 45 on day/week chart.
that's one variation we can try maybe I can do it in a future video
hi, first i want to thank you for your content is extremely educative... looking forward for a simple TrendLine Breakout Detection or TrendLine Touch Bounce....
Thank you for your support, your idea is something on my list I always vouch for a simple approach. Good luck!
I am working on Exponential Moving Average indicators backtesting with 8 period 13 period and 21 period. 8 period crossover with 21 period and their spread will indicate whether the trend is strong or not.
Let us know how it goes, thank you
ТОП связка, прогоняю денежку постоянно.
Good luck!
please make a video with the standard deviation + vwap as a strategy !
it's on my list, but it might take me a while to reach it...
Hi I really liked your videos. I wanted to know how can we determine which option to buy at which strike price after getting a positive signal. Please do make a video on that too
Thank you for your support, I usually only buy what the signal indicates, I don't know if this answers your question
Mate, you are doing an amasing job, an exceptional contribution to the trading and programming fields. My infinite gratitude for your contributions. Is there any way to contribute economically to your channel? God bless you.
Much appreciated! thank you. There is a join button next to the subscribe one, but you don't have to... mostly enjoy the content, share ideas and trade safe :)
how do I get the output in 13:48?
make sure all libraries are up to date
this is very awsome but icant find the vwap on trading view thanks for sharing this you made me some profits bro
Thank you for your support!
Hello. I found something, but not the easy way. Try this as an entry point. use in strips length 20 and std 2.5 . This will show both the highs and lows that can be support and resistance at 0 and 1.
data['HZ'] = (data['close'] - data['BBL_20_2.5'])/(data['BBU_20_2.5'] - data['BBL_20_2.5'])
I like it and it's easier then another method I published here for support and resistance. Thank you
@@CodeTradingCafe
Thank you, too. I will be waiting for your next video.
Excellent video and thx for the code. Be great to see you test on say 80% of the sample data and then run it without adjustment on the remaining 20% to simulate real time trading.
Thank you for your support, you are right ideally we can fit on 2 month and trade one week for example, then slide our fitting window for a new trading period, I will include this in one of my future videos.
Thanks for helping me to learn the backtesting strategies. I just want to know how to use bactesting optimize function(bt.optimize) for this custom startegy. So that we can get better results. Your help is much appreciated. Thanks
Hi, thank you for your comment, I agree the optimize function is important to show I will have to make a video about it soon.
Thanks for the help. Waiting for the same
you're a gem, thank you for the generosity. I will sign up for your course. my friend with 811 trades you really should include commissions and/or a minimum spread. did I miss where you have this set?
Hi in this video commissions and fees were not included, I was testing the indicator, usually for slower timeframes it's easier to get away with it even if fees are relatively high.
Very nice code. This can help a lot. Thnx bro.
You can see this videos, a very elegant way to use the BB. 👌👌 ua-cam.com/video/PcVHTx5HYwc/v-deo.html
Thank you for your support and encouragement, good luck!
thank you very much for your fantastic work for free for your subscribers.
If you can add the divergence I think the winning ratio will increase a lot.
thank you
Hi thank you for your support, which divergence?
RSI regular divergences.
Thank you so much.
Hi sir how to identity if strategy is good..
Like what should be it max draw down percentage and period,, profit, sharpe ratio etc....
Hi, depending on how much risk you want to take, you can have extra safe strategy but only 1 percent return per month or very high risk and more return. All the parameters will change accordingly.
@@CodeTradingCafe thanks mate... I wanted to know you preference regarding this...
Like what should be the minimum sharpe ratio and maximum draw down before you start using the strategy for real trading...
I would say Sharpe ratio minimum 2 preferably 2.5 with spread fees included is a good start
@@CodeTradingCafe thanks
Do you have a video where commission are included in the backtesting?
Plenty, usually for slower timeframes (daily) you can easily afford commissions. These are more recent videos check them out in this playlist.
Your work and you both are great! I loved all your videos, it is amazing. I feel like I am Fan of you. Quite impressed (obviously the work) but looking at the replies more impressed. Hates off!!
Thank you so much 😀 your support is much appreciated! Good luck for your coding... and trading.
Trying to play around with the project. Very well done. I can't seem to figure out how to correctly compinsate for a commission of something like 0.5%. You would need to add it to the backtest init as 0.005, but then the buy and sell sl and tp values does not calculate correctly. Can anyone please point me into the right direction? Or is it just that the fees would kill you quick?
Hi, I have to recheck how backtesting library is calculating the commission fees when we use for example 0.005 (the parameter in the backtesting function we are using), so far I didn't include the fees because I wanted to show indicators effects and compare among different indicators combinations.
is there a follow up video to this strategy?
Good point! there should be, but so many ideas came up and never got back to this one.
Thank you so much!
Thank you for your support 😊
Thanks for the video! The strategy is interesting but very unstable. I mean it is very sensitive to changes in parameters
Yes robustness must be tested as well to find the best parameters set, it's a start base as it seems. Usually scalping strategies are hard to tune I was happy with this one.
Thanks a lot for sharing
Thank you for your support 😊
Hi, the VWAP made in python, doesn't work like the one on tradingview. Can someone assist me please 😢
It might a variation, you can code your own as well if you need a specific VWAP. I hope this helps.
Great DR
Thank you for your support!
great! love your videos so far! how do you use this to run on the current market and make trades?
Thank you, to use a strategy live we can link it to a broker API, check this one: ua-cam.com/video/WcfKaZL4vpA/v-deo.html
Hello, thanks for video!!
Please help me with the bt.plot, I have this error : ValueError: Length of values (2) does not match length of index (1)
Do you know about that?
thanks
it seems that you are trying to plot data with only 2 values and 1 index value, I don't where the mismatch is coming from, are you sure bt.run() completed successfully?
I also have the same problem, after run 'bt', it shows results, but after line bt.plot(show_legend=False)
it shows error:
"
Data contains too many candlesticks to plot; downsampling to '1H'. See `Backtest.plot(resample=...)`
..... (many lines)
ValueError: Length of values (2) does not match length of index (1)
Thank you so much.
Thank you for your support, good luck!
How would we go about optimizing parameters in this strategy as well as any others? Is there a universal way to do it?
Hi, thanks, I think optimization can be done using different libraries, there is a module in backtesting package I should have a look at it.
@@CodeTradingCafe It would be awesome to get a video on this. Love your videos thanks man
For some reason I didn't receive your comment it was flagged as spam by YT sorry about this!
Hi, thanks a lot for sharing this profitable strategy and I have a question about Max Drawdown Duration, it is 280 days right? I think it is actually 280 canldes which means in 5M time frame it is about one day , and because the default of backtesting module is 1Day time frame it calculate each candle as a day. Am I think correctly or not?
Hi, actually it is in days, and yes it's a lot but the test was on 3 years I think. So the system might work for a year then stop working for a while or so.
You are using Ask data only. Impact of Bid price ??? Can be massive. You need to use both bid and offer data for actual trades unless you are buying at market only.
I agree, this is just to compare indicators performance rather than a full strategy, if you are keen to add spread into this a quick way is to apply a 2/1000 commission rate, it accounts for spread (but not for commissions that are broker dependent). Thank you for your comment! Good luck!
i am new to trading and technical analysis. i wanted to understand if this strategy will work better in sideways markets or trending markets? In general, when should we go for scalping and when momentum? which indicators are best to find momentum
Hi, this particular strategy is good for trending markets it catches a good entry point using the bollingers. The rest is a lot more complicated to be discussed in the comment, it depends on your trading personality.
@CodeTradingCafe Thanks! Really appreciate you replying.
Wow man! This is gold! How far is this from a trading bot that implements this strategy?
Hi, thank you, I haven't tested the robustness of this strategy yet, I must say it's easy to get lost in the numerous ways one can trade and always trying to choose the best.
Hello, i have a question. In Forex market, in my case, lotsize is 100000(doesn't matter the money), i have 1:30 leverage i can buy 0.03 of a instrument. How can i transpose those data in my backtesing strategy ? Btw Thanks a lot for your content.
Hi, thank you for your support. You can use the backtesting package to buy size lot 3000 this 0.03 and when backtesting pass the margin parameter as margin = 1/30 this will run the backtest in your conditions.
So if we are checking the VWAP and STDV, if something is above 2 STDV, then by definition, it is above VWAP. So, why check both? Maybe I am confused about the calculation, but this should be true if STDV is calculated from VWAP. Maybe if it is from regular average, then it could be different. Let me know your thoughts.
Hi, you have a good point! the stdv is computed from the moving average, but also the VWAP is used to test if consecutive candles are above or below the curve, the stdv is used only on the current candle. I hope it's a bit clearer.
Thanks
Thank you for your support!
Great content thank you ! Could you please provide where do you get the data ? It find it hard to find data at this timeframe
Hi, thank you for your support, my data is rom yfinance or dukascopy (free data), you can also download from your broker. I will make a video maybe this week showing how to download data, I am getting this question a lot, so probably worth it :)
why not implement this in mq4? Performance reasons?
Hi, at the time I moved to Python I was chasing machine learning which Python offered in large libraries with so many shiny choices... and I simply stayed with Python :)
@@CodeTradingCafe do you have a video how convert this to live trading with mt4?
Another good video to give me some new trading ideas ! Instead of using the VWAP maybe you can use the 200 EMA to confirm buying above or selling below, if the price breaks the lower Bollinger Band ?
Hi, we used the moving average in other videos, this one was for vwap and it wasn't as bad.
Hello, how we can make a strategy only long position that includes the vwap without stop loss and take profit. did i miss the video ?
Hi, well it's kind of easy simply comment the lines where sell positions are opened and erase the SL TP from the function, but how will you backtest this if it never closes a position
@@CodeTradingCafe To close the position use another indicator, why i don't use SL and TP because after so many tests me and my best friend the 'AI' 😅 we find out that it's not good to use it,
""" I don't encourage anyone not to use SL and TP, do your own research and testing , good luck 🤗 """,
i use several vwap z-score indicators and other indicators like sma cross for example to open or close the position I try to do it with the backtest library and I don't have the same result with my back_test script.
Ah ok I understand, thank you for your reply!
Hi, great video, I did not know that backtesting, it is quite intuitive and easy to interpret.
With CFDs or forex, how would you do the backtesting? because you have ask and bid data, in addition to the spread which is dynamic?
And this backtesting would support hedging? i.e. if for example I open the position, and 90% of the way I want to move the stop loss to cover profits, that could be done?
Great that you liked these videos. Yes the spread can be included as 2/1000 commission (depending on broker and asset) it's not very dynamic but the approximation is ok. And yes you can apply hedging using backtesting I did it in one of my recent videos on trading the grid system where we buy and sell 2 positions at the same time.
Great content, would it be possible to access strategy code? Thank you❤❤😊
Hi, sure, check the link in the description of the video. Good luck!
Could be interesting to try higher tf (Like h1) but smaller periods like 2-3 BBperiod
Yes it can be tuned this way but vwap is not applicable for higher timeframes so maybe we switch to different indicator.
Sir New video not coming, plzz share a video for Intraday scalp trading,1 min timeframe... Thanks
Hi, really sorry but working hard all day now I I am waiting for holidays for a new video.
WoW🤩
Thank you 🙂
Thank you so much for providing the wonderful strategy could you please confirm is it going to work on options trading in any instrument in Indian market
Hi thank you for your support, there is only one way to find out ... Backtesting, and it might need some parameters tuning depending on the traded asset. Good luck!
How do you know which point to buy or sell?
When the price dips below or above the bollinger bands
Thank you so much for sharing, may I ask what is the platform/broker you use to actually go live with these strategies? Aain thank you very much.
Hi, usually Oanda, Interactive Brokers or Binance provide good python APIs. I am more used to Oanda's though.
@@CodeTradingCafe Thank you very much!!
Yes, can it be testede for a longer time than 3 years? Let's say 10? 🙂 I like all your videos and the format. Do not expectet to trade - but the codex is very interesting. Can you consider adding a video about ruining Python code on a demo accout from a broker? Stocks/forex?
Hi thank you, at some point yes I will make a demo trading live but I am still tuning strategies...
Great content!!! I have question. The strategy apply crypto market?
Thank you for your support! yes it works on any chart because it purely technical, but the results might be different, and you definitely have to tweak the parameters.
l am getting an error message in line 4615 which is NameError: name 'null' is not defined. Line 4615 is ],
"y":
[
it's probably some modifications you applied in the code, mainly to the name of a column or so. It's hard to debug like that.
Hi nice video, please where could i find classes Strategy, Backtest from backtesting. Thx
Hi, thank you for your support, the classes are from a package called backtesting py you can install it using pip install backtesting and their web documentation is on git kernc.github.io/backtesting.py/ I hope this helps, Good luck!
Can u make a video how the execute trades with python via MT4/MT5 ?
Hi, thank you for sharing this, it has been proposed before, I think it's a good idea to link Python and MT4/5 I will add it to my list.
Great video bro, ❤ from 🇮🇳
Thank you for the effort,
Suggestion :
Can you make a video using PyQt and Plotly.
I mean we can plot the dat using plotly and should render in pyqt window, in this windows we can change meteics like SL, TP, different stock instruments, start data end date and so many other things, so that we dont to change manually and it will very interactive
Thanks for the idea! the issue is that is takes a bit more coding effort for an interactive interface.
Thanks for your nice content 👍... can you please tell me which is the best scalping strategy in your opinion and you are personally using ... this will be very appreciated
My favorite is using VWAP and wait for the price to bounce on after completed retracement, 5min or 15 min timeframe (I prefer 5 min) but in general I avoid scalping it's tiring for me, I start making mistakes after 1 hour of scalping.
@@CodeTradingCafe but arent u using this trading bot??
thank you bro
You're welcome! Thank you for your support.
I read your response that the annual profitability of some of these strategies varies by 8-14%. You mentioned again a concept of instead deploying the algorithm but using it for entry signals which calls for more work. Do you imply the profit percent will be higher if we use these algorithms for entry signals only? if so what would be the approximate return percent if we use these algorithms for signals?
Hi, yes if you use these algorithms just for signaling, but then you as a human trader validate or reject the entry signal, plus you manage the trade manually you will get better results (around 25% annual, only my estimation other traders might be better and provide 50% or more... not me). So basically the algorithms are only here to do the waiting on your behalf and when the pattern is detected it becomes your job to trade.
If would be good if you add pendind stop and limit positions, but for accounts > $1000, and to close positions just with % can be 1% or 2%, I have a working robot in mql4, but I only looking for best entries not even using SL or TP, so as mentioned just % reached, I've watching many videos from you really great videos, I love to code python as well and to find the best indicators tips and adjustments keep it up thank you.
Hi thank you for sharing, yes I agree with you actually I haven't introduced any proper trade management yet in these videos, I will get something ready showing the different ways of closing a trade, your percentage idea is also a good one! Good luck!
This is amazing video. Can we use this strategy for Stock and index future?
Definitely yes, as long as you rely on technicals it's all the same, but of course the strategy parameters have to be adjusted to the assets
In a strategy ive back tested ive managed to get 3.14 sharpe ratio, i heard if its too high youd need to be careful? My startegy is High frequency trades so the commission is rediculous when i factor it in... Which reduces the sharpe ratio quite alot - how can I reduce commission costs?
You can check if your broker has low commission accounts, or look for a different broker for this. Some brokers offer no commission trading as long as you don't leave trades opened overnight. But spread will always be there.
@@CodeTradingCafe Ou very nice to know! - Which brokers are commisionless? And allow you to integrate trading algorithms into their broker.
It depends where you are located, different places have different rules for brokers, I know in the Middle East for example CFI have no overnight commissions on Forex, just an example, Oanda have different types of accounts with different fees but come need a minimum deposit amount.
@@CodeTradingCafe im based in UK, which zero commission broker could i use? Im excited to test out the algorithm in live trading!
@@CodeTradingCafe?
hi there. I would like use Bollinger Bands and consider "lenght" and "stdev" as variables to be used within the optimization function. have you got some solving answer?!??!?! pllsssssss
It's relatively simple but the problem you will have to deal with the names of the Bollinger columns created by pandas_ta for each set of parameter. Other than that putting everything into functions and calling an arching function to execute all the files can work well.
Great video... I'll test it.... There is one question: Can I somehow learn more about signal sorting ??
Hi thank you for your comment, I am not sure I understand what you mean by signal sorting.
@@CodeTradingCafe I reviewed the video carefully... The question is removed... I was a little mistaken..
Glad you worked it out, good luck!
😮 bro , adopt me - my papers are ready
Lol, thank you for your support.
Good morning, greetings from Venezuela. I'm starting to watch your videos and they are phenomenal... what does this code work with thanks for the support
Hi thank you for your comment, this is python notebooks so you need jupyter notebook installed, try installing anaconda (see my very first video of this channel)
@@CodeTradingCafe great bro, you just gained a subscriber and python student. where I enter the broker's data to do the tests, thank you very much. Greetings from Venezuela
Wow thanks...
Thank you, glad you liked it!
@@CodeTradingCafe It's a treasure ❤️.
sir where can i to find historic candlestick data ?
Hi, dukascopy or yfinance provide data
@@CodeTradingCafe thanks... Sir for forex stocks and crypto what work best with algos...
Kindly share your experience...
@@thinketh2408 support resistance and engulfing candles ... and trend is your friend
@@CodeTradingCafe thanks man taking time to reply our comments...
Waiting for next video..
Hi,
Is there a possible to consider commission's fee for Trading bot? For example 2% or 0.1% because some of the Broker's have Commission's fee and It's very important to consider this fee.
It's a great concept.
I would like to see in future how to connect this bot to Broker's platform with API.
Thanks,
Sure it's possible to add fees, backtesting library can do this but I don't know how it's counting fees in the background, or we can do it manually as well. Connection with the broker... I have to make a new video about it, in the meantime check this one ua-cam.com/video/e1Ut4Iap10M/v-deo.html
excellent work, where did you get the data?
Hi thank you, yfinance or dukascopy both provide data.
Thapnk you about all info how can i use this code on live account apfter i download it
You will have to modify the code to connect to your broker's API, this shown how in this video: ua-cam.com/video/WcfKaZL4vpA/v-deo.html
@@CodeTradingCafe can I make it work as expert advisor on mt5
Hi, you will have to translate into mql5 language.
Very nice.... can I use it in mt5
Hi, thank you! The language I am using is python so the code as is will not work in MT5 you will need to translate into mql5.
Thanks bruh....