I have an idea for the next video, I'm currently experimenting to set a dynamic stop-loss using Parabolic SAR without setting a Take Profit, maybe that should help specially for Scalping strategies. Thank you for your video :)
the idea of using a SAR as a stop loss is valid and is almost like using a moving average as a trailing stop and works on any time frame. Of course there will be cases where you wished you had a take profit because the retracement took all your paper profits away and cases where price moves without looking back and you multiply your profits
@@vassiliscapsis5828 yes, that's it, by just setting this trailing stop loss with no tp, I experimented that some nice profits on super large trends, but only relying on this makes large drawdawns.
I was waiting for someone to comment about this :) I agree overfitting is to be avoided, but I am still convinced, in general, if you overfit on 5 years of data all together what are the chances the indicator will fail just this month? ( I mean theoretically 5 years is a lot of data and it's not one specific case)
@@CodeTradingCafe You're right. 5 years is a lot of data. Unfortunately, past performance is no guarantee of future performance :( I always optimized my strategies and found that after a few weeks/months they were performing worse and worse, so that continuous adjustment was necessary. I no longer work with indicators at all because the algorithms usually have too many degrees of freedom. I prefer to scalp Nasdaq and S&P futures by analyzing the order flow. This works regardless of market phases, whereas indicators sometimes only work under certain conditions :)
@@CodeTradingCafe Exactly what I did! For 10 coins got 1million hist candles for each and optimized stops, takes and indicators that I use. Results are awesome in real trading. But I also fixed the order enter price from fix Close to random between open/close. And results now are up to 100% accurate as in real life trading
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.
Hi, I think I understand what you mean, I did try time series before I also tried facebook's algorithm Prophet check this video: ua-cam.com/video/lmoHsgSKBNA/v-deo.html
Can you please implement Walk Forward Optimization to this strategy.? Simply find best in sample and out sample parameters - instead of finding best indicator param for whole DF, find best indi for in sample, and test on out sample and iterate in walk forward optimkzation.
Hi, check this video ua-cam.com/video/cOptF4hcYhs/v-deo.html Forward testing is included but for a different indicator, you can merge both codes for a quick start.
Great stuff. Got case study where im trying to categorize large pip movements in the market and try to see hidden unkown patterns or characteristics of those pip movements to get a mean value of indicators on those movements maybe you help with that. Thanks
Hello my friend Please answer my question to solve my problem I'm a Laravel (PHP) programmer, but I need to do a project that treats Python like this, the structure of the project is like this: We have a chart and whenever our chart comes to buy and sell patterns it tells us when it's time to buy or sell, patterns like head and shoulder or triangle, etc. Or the patterns that traders use I want this course to help me ؟
Hi, sorry I don't code in PHP but I do have couple of videos around triangle and flag patterns, head and shoulders as well, check them out they might be of help.
lol it has colors :D I like visuals too, if you are into data science and visualization check these 2 sites for cool ideas: www.data-to-viz.com/ datavizproject.com/
I would be so happy if you could reply this asap but I respect your time and all the effort you put into your videos so I can only hope you do. My question is whether you used machine learning in this video, there is no mention of it but I wonder if there is a machine learning model that can be used optimize indicators. I am working on a research topic and machine learning learning application in algorithmic trading is an area of interest but I want something simple I can do and complete within limited time, given I am a novice in python Thank you
In this video no I haven't. Previous videos I tested some ideas nothing really impressive with ML results for trading: ua-cam.com/video/lhrCz6t7rmQ/v-deo.html ua-cam.com/video/tNFnACpzxVw/v-deo.html ua-cam.com/video/m1rY2J8ZlsY/v-deo.html
@@CodeTradingCafe Thanks for your fast response! In your video comparing technical indicators, do you think using a short number of days instead of a 200-250pip count would yield better results?
Is there a way to test for highest return with lowest max drawdown. I have a number of algos that perform extremely well but suffer from high max drawdown. I would like to trade off % return against max drawdown however the optimizer only seems to return a heat map of stop loss and take profit (whatever metric you use) that result in % returns regardless of Max DD. I guess I could roll my own but it would be a painful job
Had a fiddle with this and there is no easy way so heres the code to roll your own ## DEFINE BACKTEST PARAMS ## lower_b = 10 upper_b = 31 slcoef_values = [i / 10 for i in range(lower_b, upper_b)] # 1.0 to 3.0 in steps of 0.1 TPSLRatio_values = [i / 10 for i in range(lower_b, upper_b)] # 1.0 to 3.0 in steps of 0.1 for slcoef, TPSLRatio in itertools.product(slcoef_values, TPSLRatio_values): MyStrat.slcoef = slcoef MyStrat.TPSLRatio = TPSLRatio
bt = Backtest(data, MyStrat, cash=capital) stats = bt.run() ### REPORT INFO I WANT ### algo_ret = capital + capital*(getattr(stats,'Return [%]')/100) BH_Ret = capital + capital*(getattr(stats,'Buy & Hold Return [%]')/100) out_under_perform = getattr(stats,'Return [%]') - getattr(stats,'Buy & Hold Return [%]') getattr(stats,'Max. Drawdown [%]') # oup_dollars = getattr(stats,'Equity Final [$]') - ((getattr(stats,'Buy & Hold Return [%]')/100) * capital) oup_dollars = algo_ret - BH_Ret ### DF FOR EACH RUN IE DATA I WANT ### ### NB max_drawdown ROUTINE NOT INCLUDED FOR B&H ### df_res = pd.DataFrame({'Target' : ticker, 'SL/TP' : str(slcoef) + '/' + str(TPSLRatio), 'Buy Hold %' : getattr(stats,'Buy & Hold Return [%]'), 'Return %' : getattr(stats,'Return [%]'), 'B&H Ret$' : '${:,.2f}'.format(BH_Ret), 'Algo Ret$' : '${:,.2f}'.format(algo_ret), 'Out/Under Perform %' : out_under_perform, 'Out/Under Perform $' : '${:,.2f}'.format(oup_dollars), 'Annual Return %' : getattr(stats,'Return (Ann.) [%]'), 'Win Rate' : getattr(stats,'Win Rate [%]'), 'Annual Vol' : getattr(stats,'Volatility (Ann.) [%]'), 'Max DD' : getattr(stats,'Max. Drawdown [%]'), 'B&H Max DD': (-1*max_drawdown(data.Close))*100, 'Avg DD' : getattr(stats,'Avg. Drawdown [%]'), 'Total Trades' : getattr(stats,'# Trades'), 'Sharpe Ratio' : getattr(stats,'Sharpe Ratio'), 'Profit Factor' : getattr(stats,'Profit Factor')},index=[1])
@@CodeTradingCafe an alternative: # Define parameter ranges lower_b = 10 upper_b = 31 slcoef_values = [i / 10 for i in range(lower_b, upper_b)] # 1.0 to 3.0 in steps of 0.1 TPSLRatio_values = [i / 10 for i in range(lower_b, upper_b)] # 1.0 to 3.0 in steps of 0.1 ## ALGO CODE HERE ## for slcoef, TPSLRatio in itertools.product(slcoef_values, TPSLRatio_values): MyStrat.slcoef = slcoef MyStrat.TPSLRatio = TPSLRatio
bt = Backtest(data, MyStrat, cash=capital) stats = bt.run() algo_ret = capital + capital*(getattr(stats,'Return [%]')/100) BH_Ret = capital + capital*(getattr(stats,'Buy & Hold Return [%]')/100) out_under_perform = getattr(stats,'Return [%]') - getattr(stats,'Buy & Hold Return [%]') getattr(stats,'Max. Drawdown [%]') # oup_dollars = getattr(stats,'Equity Final [$]') - ((getattr(stats,'Buy & Hold Return [%]')/100) * capital) oup_dollars = algo_ret - BH_Ret
# What is the average stop loss and the average take profit num_recs = len(tp_long) tp_average_value = round(np.mean(tp_long[0:num_recs]),2) sl_average_value = round(np.mean(sl_long[0:num_recs]),2)
@FeverYonge I like this book, and yes while being aware that there is a bit of luck hoping we are in a year/month/decade where a trading system still works, sometimes chances are high.
i was thinking og trading with the help of reinforcment learning where we give 5 option to our agent (buy,close buy,sell , close sell,do nothing) but it is hard to impliment as i dont have experince in reinforcment learning
It doesn't work, tried it before, for reasons that don't for in the comments, the best is if I make a video about it. But still it's interesting to see!
This will make your backtest look very good, but when you take it to simulation on out of sample data more than likely you'll find that it overfit. The optimization range is too tight, and should be limited to values that are expected to generalize well. For example, if your data is 1-min, you should try fitting maybe 1, 5, 13, 60, and 390. Since those might generalize.
Hi, thank you for the detailed comment. I agree overfit is tricky, I usually think that if we fit on let's say 5 years of data it kind of generalizes at the end since 5 years is a lot of scenarios and it has to work for a month or 2 at least... but it's just a theory I still have to prove it :)
@@CodeTradingCafe Maybe. I was using 1-min data, so there might be something to what you're saying for that reason. On the other hand, even something like 60,000 1-min ticks, and it's still going to overfit on the 1-min.
@@CodeTradingCafe I already did. The backtests are awesome, even with cross validation, but in portfolio simulation, on the exact same datasets, it performs worse than plain cross validated backtests in the same portfolio simulation. The only variable aside from the backtest method is that the portfolio simulation selects that best performers from backtest to construct the trading portfolio, so between fit models and unfit models it is not the case that fitting gave any kind of edge on 1-min time scaled ohlc. It continously over fits. Portfolio candidate selection primarily was based on median return lower 95% confidence interval, and also restricted by average length of time a position was held.
This is really awesome stuff. Would be interesting to do a video about going over how to run multiple strategies at once to generate signals and then the order execution part based on these signals.
I would like to make a video request: Updated video automating a strategy on Binance API (in Python), using features such as entry, stop loss, take profit, leverage (10x, 50x, etc.), partial profit taking, etc. That would be great!
Thanks for this. I tried to change the EMAs to Vortex but struggled (i.e. failed). If you get bored it would be great to see Vortex optimised with a volatility indicator !
@@CodeTradingCafe That's the one ! Here's the code for pandas-ta - import pandas_ta as ta length = 14 vortex = ta.vortex(df['High'], df['Low'], df['Close'], length=length) print(vortex) # Add Vortex Indicator to the DataFrame df['viplus'] = vortex[f'VTXP_{length}'] df['viminus'] = vortex[f'VTXM_{length}']
Hi, at the moment NN are not that impressive in trading at least as far as I know, they might be useful as a one indicator among others, but I find simple algorithms more powerful.
Yes it's a trap, I don't usually fit indicators like this really, I just choose average parameters and count that the strategy itself is good. But I agree also out of sample validation is a must if we intend to optimize like this.
I just discovered your channel, that's insane content ! Hundred of thanks
Glad you enjoy it! Thank you for your support!
I have an idea for the next video, I'm currently experimenting to set a dynamic stop-loss using Parabolic SAR without setting a Take Profit, maybe that should help specially for Scalping strategies. Thank you for your video :)
Thank you for your support, I will keep the SAR in mind, haven't done any video about it yet!
the idea of using a SAR as a stop loss is valid and is almost like using a moving average as a trailing stop and works on any time frame. Of course there will be cases where you wished you had a take profit because the retracement took all your paper profits away and cases where price moves without looking back and you multiply your profits
@@vassiliscapsis5828 yes, that's it, by just setting this trailing stop loss with no tp, I experimented that some nice profits on super large trends, but only relying on this makes large drawdawns.
Seems like a good way to overfit your algos/ indicators :D
I was waiting for someone to comment about this :) I agree overfitting is to be avoided, but I am still convinced, in general, if you overfit on 5 years of data all together what are the chances the indicator will fail just this month? ( I mean theoretically 5 years is a lot of data and it's not one specific case)
@@CodeTradingCafe You're right. 5 years is a lot of data. Unfortunately, past performance is no guarantee of future performance :( I always optimized my strategies and found that after a few weeks/months they were performing worse and worse, so that continuous adjustment was necessary. I no longer work with indicators at all because the algorithms usually have too many degrees of freedom. I prefer to scalp Nasdaq and S&P futures by analyzing the order flow. This works regardless of market phases, whereas indicators sometimes only work under certain conditions :)
Exactly why you break your data up so you can forward test unseen data.😊
order flow is a good alternative, I also found support resistance and price patterns work well if you think of what's happening in the background.
@@CodeTradingCafe Exactly what I did! For 10 coins got 1million hist candles for each and optimized stops, takes and indicators that I use. Results are awesome in real trading. But I also fixed the order enter price from fix Close to random between open/close. And results now are up to 100% accurate as in real life trading
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.
Hi, I think I understand what you mean, I did try time series before I also tried facebook's algorithm Prophet check this video: ua-cam.com/video/lmoHsgSKBNA/v-deo.html
Can you please implement Walk Forward Optimization to this strategy.? Simply find best in sample and out sample parameters - instead of finding best indicator param for whole DF, find best indi for in sample, and test on out sample and iterate in walk forward optimkzation.
Hi, check this video ua-cam.com/video/cOptF4hcYhs/v-deo.html
Forward testing is included but for a different indicator, you can merge both codes for a quick start.
I did not know this exist so I builted my own backtester with the optimizer function for indecators LoL
In Python everything already exists lol welcome aboard
Great stuff. Got case study where im trying to categorize large pip movements in the market and try to see hidden unkown patterns or characteristics of those pip movements to get a mean value of indicators on those movements maybe you help with that. Thanks
Hi provide a bit more details here I will check it out.
Hello my friend
Please answer my question to solve my problem
I'm a Laravel (PHP) programmer, but I need to do a project that treats Python like this, the structure of the project is like this:
We have a chart and whenever our chart comes to buy and sell patterns it tells us when it's time to buy or sell, patterns like head and shoulder or triangle, etc. Or the patterns that traders use
I want this course to help me ؟
Hi, sorry I don't code in PHP but I do have couple of videos around triangle and flag patterns, head and shoulders as well, check them out they might be of help.
@@CodeTradingCafe Wow, thank you very much my friend for your reply
Using a heatmap while optimizing a strategy makes me feel like a badass data scientist. Dunno why :D
lol it has colors :D I like visuals too, if you are into data science and visualization check these 2 sites for cool ideas:
www.data-to-viz.com/
datavizproject.com/
Actually when i use 1hour eurusd data instead of 30m data , the returns increases from 16 to 61%.
Yes if the commissions are 0, usually it goes this way, but if you add a slight commission lower timeframes become more challenging.
I would be so happy if you could reply this asap but I respect your time and all the effort you put into your videos so I can only hope you do.
My question is whether you used machine learning in this video, there is no mention of it but I wonder if there is a machine learning model that can be used optimize indicators.
I am working on a research topic and machine learning learning application in algorithmic trading is an area of interest but I want something simple I can do and complete within limited time, given I am a novice in python
Thank you
In this video no I haven't. Previous videos I tested some ideas nothing really impressive with ML results for trading:
ua-cam.com/video/lhrCz6t7rmQ/v-deo.html
ua-cam.com/video/tNFnACpzxVw/v-deo.html
ua-cam.com/video/m1rY2J8ZlsY/v-deo.html
@@CodeTradingCafe Thanks for your fast response! In your video comparing technical indicators, do you think using a short number of days instead of a 200-250pip count would yield better results?
There is only one way to find out, by running the simulation, it's very hard to forecast ML it's somehow a black/grey box I would say.
Is there a way to test for highest return with lowest max drawdown. I have a number of algos that perform extremely well but suffer from high max drawdown. I would like to trade off % return against max drawdown however the optimizer only seems to return a heat map of stop loss and take profit (whatever metric you use) that result in % returns regardless of Max DD. I guess I could roll my own but it would be a painful job
Had a fiddle with this and there is no easy way so heres the code to roll your own
## DEFINE BACKTEST PARAMS ##
lower_b = 10
upper_b = 31
slcoef_values = [i / 10 for i in range(lower_b, upper_b)] # 1.0 to 3.0 in steps of 0.1
TPSLRatio_values = [i / 10 for i in range(lower_b, upper_b)] # 1.0 to 3.0 in steps of 0.1
for slcoef, TPSLRatio in itertools.product(slcoef_values, TPSLRatio_values):
MyStrat.slcoef = slcoef
MyStrat.TPSLRatio = TPSLRatio
bt = Backtest(data, MyStrat, cash=capital)
stats = bt.run()
### REPORT INFO I WANT ###
algo_ret = capital + capital*(getattr(stats,'Return [%]')/100)
BH_Ret = capital + capital*(getattr(stats,'Buy & Hold Return [%]')/100)
out_under_perform = getattr(stats,'Return [%]') - getattr(stats,'Buy & Hold Return [%]')
getattr(stats,'Max. Drawdown [%]')
# oup_dollars = getattr(stats,'Equity Final [$]') - ((getattr(stats,'Buy & Hold Return [%]')/100) * capital)
oup_dollars = algo_ret - BH_Ret
### DF FOR EACH RUN IE DATA I WANT ###
### NB max_drawdown ROUTINE NOT INCLUDED FOR B&H ###
df_res = pd.DataFrame({'Target' : ticker,
'SL/TP' : str(slcoef) + '/' + str(TPSLRatio),
'Buy Hold %' : getattr(stats,'Buy & Hold Return [%]'),
'Return %' : getattr(stats,'Return [%]'),
'B&H Ret$' : '${:,.2f}'.format(BH_Ret),
'Algo Ret$' : '${:,.2f}'.format(algo_ret),
'Out/Under Perform %' : out_under_perform,
'Out/Under Perform $' : '${:,.2f}'.format(oup_dollars),
'Annual Return %' : getattr(stats,'Return (Ann.) [%]'),
'Win Rate' : getattr(stats,'Win Rate [%]'),
'Annual Vol' : getattr(stats,'Volatility (Ann.) [%]'),
'Max DD' : getattr(stats,'Max. Drawdown [%]'),
'B&H Max DD': (-1*max_drawdown(data.Close))*100,
'Avg DD' : getattr(stats,'Avg. Drawdown [%]'),
'Total Trades' : getattr(stats,'# Trades'),
'Sharpe Ratio' : getattr(stats,'Sharpe Ratio'),
'Profit Factor' : getattr(stats,'Profit Factor')},index=[1])
df_aggr = pd.concat([df_aggr, df_res], ignore_index=True)
df_aggr = df_aggr.sort_values(by=['Return %', 'Max DD'], ascending=[False, True])
df_aggr.to_csv('C:\\temp\\Agregated_Results_YEARS.csv', encoding='utf-8', index=False)
The easiest is simply to optimize for minimal drawdown then the obtained return percentage is a result of this.
@@CodeTradingCafe an alternative: # Define parameter ranges
lower_b = 10
upper_b = 31
slcoef_values = [i / 10 for i in range(lower_b, upper_b)] # 1.0 to 3.0 in steps of 0.1
TPSLRatio_values = [i / 10 for i in range(lower_b, upper_b)] # 1.0 to 3.0 in steps of 0.1
## ALGO CODE HERE ##
for slcoef, TPSLRatio in itertools.product(slcoef_values, TPSLRatio_values):
MyStrat.slcoef = slcoef
MyStrat.TPSLRatio = TPSLRatio
bt = Backtest(data, MyStrat, cash=capital)
stats = bt.run()
algo_ret = capital + capital*(getattr(stats,'Return [%]')/100)
BH_Ret = capital + capital*(getattr(stats,'Buy & Hold Return [%]')/100)
out_under_perform = getattr(stats,'Return [%]') - getattr(stats,'Buy & Hold Return [%]')
getattr(stats,'Max. Drawdown [%]')
# oup_dollars = getattr(stats,'Equity Final [$]') - ((getattr(stats,'Buy & Hold Return [%]')/100) * capital)
oup_dollars = algo_ret - BH_Ret
# What is the average stop loss and the average take profit
num_recs = len(tp_long)
tp_average_value = round(np.mean(tp_long[0:num_recs]),2)
sl_average_value = round(np.mean(sl_long[0:num_recs]),2)
df_res = pd.DataFrame({'Target' : ticker + "_" + test,
'SL/TP' : str(slcoef) + '/' + str(TPSLRatio),
'Avg SL/TP': str(sl_average_value) + ' / ' + str(tp_average_value),
'Buy Hold %' : getattr(stats,'Buy & Hold Return [%]'),
'Return %' : getattr(stats,'Return [%]'),
'B&H Ret$' : '${:,.2f}'.format(BH_Ret),
'Algo Ret$' : '${:,.2f}'.format(algo_ret),
'Out/Under Perform %' : out_under_perform,
'Out/Under Perform $' : '${:,.2f}'.format(oup_dollars),
'Annual Return %' : getattr(stats,'Return (Ann.) [%]'),
'Win Rate' : getattr(stats,'Win Rate [%]'),
'Annual Vol' : getattr(stats,'Volatility (Ann.) [%]'),
'Max DD' : getattr(stats,'Max. Drawdown [%]'),
'B&H Max DD': (-1*max_drawdown(data.Close))*100,
'Avg DD' : getattr(stats,'Avg. Drawdown [%]'),
'Total Trades' : getattr(stats,'# Trades'),
'Sharpe Ratio' : getattr(stats,'Sharpe Ratio'),
'Profit Factor' : getattr(stats,'Profit Factor')},index=[1])
df_aggr = pd.concat([df_aggr, df_res], ignore_index=True)
df_aggr = df_aggr.sort_values(by=['Return %', 'Max DD'], ascending=[False, True])
df_aggr.to_csv('C:\\temp\\Agregated_Results_YEARS.csv', encoding='utf-8', index=False)
df_aggr
spit out to csv for analysis in excel
I'm going through each and every videos of your. Even in udemy as well.
Thank you so much for sharing all this knowledge
Thank you for your support!
@FeverYonge I like this book, and yes while being aware that there is a bit of luck hoping we are in a year/month/decade where a trading system still works, sometimes chances are high.
Great video. Please create more videos about optimizing strategies using other indicators.
More to come! thank you for your support.
True, v can expect more
@@CodeTradingCafe3:13
what's at 3:13?
what is important is to understand the principle of optimization and how it works.
thanks bro helps a lot
Thank you for your comment.
I am pleasantly surprised to see your channel! Thank you a lot for your content, very interesting and informative!
So nice of you! Thank you for your support.
i was thinking og trading with the help of reinforcment learning where we give 5 option to our agent (buy,close buy,sell , close sell,do nothing) but it is hard to impliment as i dont have experince in reinforcment learning
It doesn't work, tried it before, for reasons that don't for in the comments, the best is if I make a video about it. But still it's interesting to see!
This will make your backtest look very good, but when you take it to simulation on out of sample data more than likely you'll find that it overfit. The optimization range is too tight, and should be limited to values that are expected to generalize well. For example, if your data is 1-min, you should try fitting maybe 1, 5, 13, 60, and 390. Since those might generalize.
Hi, thank you for the detailed comment. I agree overfit is tricky, I usually think that if we fit on let's say 5 years of data it kind of generalizes at the end since 5 years is a lot of scenarios and it has to work for a month or 2 at least... but it's just a theory I still have to prove it :)
@@CodeTradingCafe Maybe. I was using 1-min data, so there might be something to what you're saying for that reason. On the other hand, even something like 60,000 1-min ticks, and it's still going to overfit on the 1-min.
I must try it with iterative out of sampling to verify
@@CodeTradingCafe I already did. The backtests are awesome, even with cross validation, but in portfolio simulation, on the exact same datasets, it performs worse than plain cross validated backtests in the same portfolio simulation. The only variable aside from the backtest method is that the portfolio simulation selects that best performers from backtest to construct the trading portfolio, so between fit models and unfit models it is not the case that fitting gave any kind of edge on 1-min time scaled ohlc. It continously over fits. Portfolio candidate selection primarily was based on median return lower 95% confidence interval, and also restricted by average length of time a position was held.
Thanks for the feedback I am skeptical also 1 min timeframe that must incur high relative spread and trading fees. I would go more towards 1h TF.
This is really awesome stuff. Would be interesting to do a video about going over how to run multiple strategies at once to generate signals and then the order execution part based on these signals.
Hi, it's a good idea, thank you. I will be showing multiple assets first, and maybe multiple timeframes , these were requiested a while ago.
@@CodeTradingCafe Thanks that would be really awesome!
I would like to make a video request:
Updated video automating a strategy on Binance API (in Python), using features such as entry, stop loss, take profit, leverage (10x, 50x, etc.), partial profit taking, etc.
That would be great!
Thank you I will put binance on my list, it has been requested many times.
Thanks for this. I tried to change the EMAs to Vortex but struggled (i.e. failed). If you get bored it would be great to see Vortex optimised with a volatility indicator !
Hi, did you mean the vortex indicator described here www.investopedia.com/terms/v/vortex-indicator-vi.asp ?
@@CodeTradingCafe That's the one ! Here's the code for pandas-ta - import pandas_ta as ta
length = 14
vortex = ta.vortex(df['High'], df['Low'], df['Close'], length=length)
print(vortex)
# Add Vortex Indicator to the DataFrame
df['viplus'] = vortex[f'VTXP_{length}']
df['viminus'] = vortex[f'VTXM_{length}']
any role for neural networks to optimize multiple indicators?
I only recently started looking into neural networks for algo trading, but they don't seem too promising. I really want to be proven wrong, though.
Hi, at the moment NN are not that impressive in trading at least as far as I know, they might be useful as a one indicator among others, but I find simple algorithms more powerful.
To add your codes to the trading platform do l have to have mt4 or mt5?
No this is only python no metatrader needed.
@@CodeTradingCafe so do l need to download python?
Yes, and install python with some libraries like pandas_ta
how do I get the "Gmt time"? I got key error:'Gmt time' plizz heeelpp
key error means that you dont have gmt time as a column in your dataset , check the column names of your dataset and handle them accordingly
Be careful, optimizing is often overfitting, be sure to cross validate on not seen data.
Yes it's a trap, I don't usually fit indicators like this really, I just choose average parameters and count that the strategy itself is good. But I agree also out of sample validation is a must if we intend to optimize like this.
How to plot support and resistance using python in stocks market?
You have been following me closely :) I have few videos about this topic, check this one ua-cam.com/video/xky3ZiCsEDs/v-deo.html
Is this transferable to forex trading?
yes
Why didn't you use MQL5?
Python has more options using ML, neural networks and what not...
vectorbt is faster and simplier
faster yes, simpler I would argue that, not sure.
Thank you so much sirji
Thank you for your support!
awesome, thanks alot
Thank you for your constant support! Glad you find this vid interesting.