Excellent content.. was looking for exactly this.. however, one variation that I am looking for is to break-even stops. For example, after the price reaches 1R, the SL could be moved to the entry point (or break even point) and then the SL starts trailing from there forward. Thanks anyway for the video.. keep this coming!
@CodeTradingCafe2 жыл бұрын
Hi thank you for your comment, actually yes I see what you mean, there are different variations of trade management, it's worth backtesting some of them. Good luck, see you around I guess
@1cBoris2 жыл бұрын
Hi, sorry for my english. Thanks for your videos, they are amazing. If we get the current price from the order book, for analysis and real trading, the stop loss will work much earlier than at the end of the candle. The candle looks like one beautiful movement, and there is a lot of volatility hidden inside.
@CodeTradingCafe2 жыл бұрын
You are right, one way of avoiding this is to put SL outside the candle range, but you have to test the system again to make sure the odds are on your side. Thank you for sharing your ideas, good luck!
@LIL_MISSA4 ай бұрын
Keep up the good work man, i love your codes and explanations ❤
@CodeTradingCafe4 ай бұрын
Glad you like them! Thank you for your support, much appreciated!
@DKFBJ2 ай бұрын
Thank you for the very nice video! How can i find the "backtest.py" file? Used in "from backtest import Strategy, Backtest" I could not find out where this was posted. Have a great day
@CodeTradingCafe2 ай бұрын
Hi, you need to install the package using pip: pip install backtesting Good luck
@DKFBJ2 ай бұрын
@@CodeTradingCafe Thank you for the quick response! Should just have figured this myself haha, have a great day
@johnmorales75312 жыл бұрын
I just intalled Python to learn and be able to practice all this nice algoritms. Thanks for help people to learn.
@CodeTradingCafe2 жыл бұрын
Good luck, remember learn slow but regular work don't get discouraged if it takes time
@cryptolicious37382 жыл бұрын
great video ! i really enjoyed this study of tsl tp strategies!
@CodeTradingCafe2 жыл бұрын
Thank you, are you interested in coding as well?
@paulbrown58392 жыл бұрын
I like the idea of using ATR to adjust the stoploss at the end of every bar ... but instead of using ATR you should try a realtime volatility pulled in from somewhere else, maybe options market. ATR is too slow. Thoughts?
@CodeTradingCafe2 жыл бұрын
I guess something like a custom function checking the ATR and the lowest/highest points of few previous candles then providing something around these values would be an improvement. But if trying to get the info from elsewhere the algo can as well keep an eye on the different correlated currencies...
@paulbrown58392 жыл бұрын
@@CodeTradingCafe ATR is telling you what the volatility was, not what it is. $EVZ might be better, and that is based on 1 month currency options.
@CodeTradingCafe2 жыл бұрын
Will check it out hopefully it's reliable
@sibiljas36282 жыл бұрын
You are best . I wanted continue ❤❤❤
@CodeTradingCafe2 жыл бұрын
Thanks a lot for your support 😊
@rafalsza2 жыл бұрын
Great video. Did you tried vectorb for backtesting instead?
@CodeTradingCafe2 жыл бұрын
I did have a look at it, to be honest I wasn't happy with their documentation, it was too time consuming to guess their functions so I simply moved to backtesting py
@sergiopadronarellano5437 Жыл бұрын
Thanks a lot for sharing knowledge, code and video, very very usefull all your videos
@CodeTradingCafe Жыл бұрын
Thank you for your support, it makes a difference
@yanchobeats2 жыл бұрын
Can you please clarify what these atr_f and ratio_f stand for and what 0.2 and 1 mean at 11:30. When I try this params on my algo (I am testing it on 1min timeframe) I get instantly taken out of the position. Thank you for the awesome work!
@CodeTradingCafe2 жыл бұрын
The first is a ratio variable to define SL from ATR so SL distance is atrf * ATR, and the second is the TP SL ratio. Hope this helps, good luck!
@mcdawgzy9 ай бұрын
Awesome video, thanks so much for sharing
@CodeTradingCafe9 ай бұрын
Thanks for watching!
@a.winath40242 жыл бұрын
Thank you so much friend!
@CodeTradingCafe2 жыл бұрын
Thank you for your appreciation
@jeffb99677 ай бұрын
hello and thank you for your great videos. Could you please tell me if these stop loss's work with crypto trading, in particular, ccxt and kucoin exchange, and will it work with any exchange?
@CodeTradingCafe7 ай бұрын
Hi, thank you for your support, in principle yes any technical chart is the same, so the same SL TP principles can be applied.
@sylas9762 Жыл бұрын
Hi is there anyway to backtest trailing and stop loss using pct( percentage of profit/loss), rather than ATR? and is there indicator or mathematic way to identify low volatility of the market and sideway market? Thank you in advance.
@CodeTradingCafe Жыл бұрын
Hi definitely you can use percentage distance instead of ATR, it's relatively simple. Regarding identifying low volatility you can use ATR it's a good volatility indicator or check this video kzbin.info/www/bejne/ppncZmp6j7R8rcU you can detect narrow channels for low volatility. I hope this helps!
@aidakhalil13942 жыл бұрын
Bravooo👌
@CodeTradingCafe2 жыл бұрын
:) thank you
@walduss79392 жыл бұрын
Thanks to share.
@CodeTradingCafe2 жыл бұрын
Thank you for your support 😊
@yuvalbra2 жыл бұрын
thanks, great video knowlage, can you share the code
@CodeTradingCafe2 жыл бұрын
done it's in the description, enjoy coding
@FootfunI2 жыл бұрын
Thank you for your very interesting and exciting video. I have question, if it writes that file is not found and the problem have to be in the second cell, where is code: df = pd.read_csv("EURUSD_Candlestick_1_D_ASK_05.05.2003-30.06.2021.csv"), what i have to do with it?
@CodeTradingCafe2 жыл бұрын
Hi you can put the file in the same folder as the python file to.be found. Or try including the path in the code l.
@FootfunI2 жыл бұрын
@@CodeTradingCafe Will I pissed you off if I ask you for code you are writing about? I am really lost.
@CodeTradingCafe2 жыл бұрын
@@FootfunI no worries, just copy your error message here I will try to help. If it's unfound file try rechecking the name of the file and the path.
@FootfunI2 жыл бұрын
@@CodeTradingCafe FileNotFoundError Input In [2], in () 1 import pandas as pd ----> 2 df = pd.read_csv("EURUSD_Candlestick_4_Hour_ASK_05.05.2003-16.10.2021.csv") 3 df.columns=['time', 'open', 'high', 'low', 'close', 'volume'] 4 #Check if NA values are in data File ~\anaconda3\lib\site-packages\pandas\util\_decorators.py:311, in deprecate_nonkeyword_arguments..decorate..wrapper(*args, **kwargs) 305 if len(args) > num_allow_args: 306 warnings.warn( 307 msg.format(arguments=arguments), 308 FutureWarning, 309 stacklevel=stacklevel, 310 ) --> 311 return func(*args, **kwargs)
@CodeTradingCafe2 жыл бұрын
@@FootfunI yes it can't find the file you can put both python code file and data file in the same folder or include the path from the read_csv function
@paulbrown58392 жыл бұрын
hey man , why dont you show your sharpe ratio?
@CodeTradingCafe2 жыл бұрын
Never thought about it to be honest, but also I am afraid not everyone is familiar with it so it's worth a video on its own...
@paulbrown58392 жыл бұрын
@@CodeTradingCafe Anybody watching these videos knows what it is, i think.
@paulbrown58392 жыл бұрын
@@CodeTradingCafe It would be good to show Sharpe in your videos. It's the only way we can compare your strategy to others because you don't show your vol either.
@kodzuvu2 жыл бұрын
How to run auto trade on any Brocker?
@CodeTradingCafe2 жыл бұрын
Hi, it doesn't work for any broker because each broker has its own API, so the best way is first choose the broker and then learn their API... Now this wad the easy part... Now comes finding a winning strategy to automate :) this is a lifetime teaser
@Dr.jayfrancis2 жыл бұрын
Some day, I'll understand these advanced algos.. but not now xD