Trade Fee and Slippage Impact in a TradingView Strategy

Trade Fee and Slippage Impact in a TradingView Strategy

YouTube Video

YouTube Video Transcript

hey this is David for big bits and in this video we are gonna be taking a look at trade fees and also slippage as it refers to your maximum profit when you’re creating a strategy on trading view the default strategy that we are working with is going to be the Bollinger Bands strategy and by default it does not include trade fees or slippage in the price so that’s something to be very mindful of now you’re probably aware of what trade fees are is whenever you make a trade there is an Associated fee to execute the trade so with Bitcoin versus the US dollar like we’re doing here a lot of times it’s a percentage based fee so we’re going to be looking at a percentage based fee and comparing the results of the strategy and then we are also going to be looking at the slippage and how that actually impacts your trades here on your strategy now you will also want to know that when you’re dealing with a strategy such as this on trading view whenever you see the entry on these default strategies you’re usually actually not going to be able to execute until after it shows that it executed on this candle but a lot of times your actual entry wouldn’t be until the end or the close of the candle so that’s something to keep in mind and that’s also something to consider when you’re doing your slippage because when you’re doing this you’re probably not gonna get the most optimal entry like it shows a lot of times on these default strategies now what you can do if you’re developing your own strategy and I do these pon script tutorials on YouTube here so if you haven’t seen those go back and check those out I’ll show you how to create a strategy from scratch but if you’re doing this you can actually set your strategy to look at the previous candle so if this candle triggered the trade this would actually be your entry but in this case this is your entry I mean this is the candle that triggers the trade and your entry wouldn’t be until up here actually so that’s something to keep in mind as well so the numbers might look a little bit off at Tom’s so let’s go ahead and take a look at some of the numbers here and I’m gonna move my head out of the way so that you don’t have to see me and you can actually see some of the information on how the results are actually done now I’m going to also add the Bollinger Bands on here just because we need to see what we’re working with here and it will have the exact same parameters as the other one now on this one the strategy from trading view and their default strategy here is just when the price goes under and then comes back in above the lower band or when it goes over and comes back down so when it comes back up it’s a buy when it goes down it’s a cell or a closed so as you can see with this strategy on a 15-minute chart you have a one point five eight percent loss now let’s also compare that to a four-hour chart you have a twenty three and a half percent loss on the four-hour chart so this is something this strategy is probably not something that’s you’re going to be using especially if you see results like this so we’re just gonna use it to compare and keep these numbers as a baseline so twenty three and a half percent on the 4-hour and on the 15-minute chart it’s only one point five eight percent now keep in mind that the maximum bars back in the maximum candles back this back test goes it doesn’t go as far back as that for our chart so since it’s you know see 16 times smaller I believe I hope that’s right since it’s about sixteen times smaller you get about 16 times more candles that it would have to work with so you actually have 16 times less data points to actually consider for your entries and exits a little bit confusing but essentially you can have more entries if you were to include the same period of time as you did your entire 4-hour chart so that might be a little bit confusing if it is leave a comment and I’ll try and explain it a little bit better but now that we have that explained we are looking at this particular chart we have a one point five eight percent loss so what I’ve done is I’ve actually added a couple of parameters into the strategy function to basically set our Commission value and also our slippage now the Commission value we are going to be using this percentage-wise and we’re going to be using the fees from by Nantz which is 0.1 percent fee so let’s actually save this and we’ll update our strategy now you’ll see we had a 5.4 3 percent loss and that is pretty significant you’ll see that our Commission paid analysis the fees we paid three thousand eight hundred and fifty eight dollars in fees just to execute all of these trades so when you looked at the actual strategy you would have seen you only lost one point five eight percent now imagine if that said you had gained one point five eight percent you would actually be negative even if you were in profit one point five eight percent because the amount you spent on fees was so great that it would have pushed you so far negative or it you would have spent so much it would have pushed you negative excuse me so let’s also take a look at this on the 4-hour chart which I believe it was twenty three and a half percent so you’ll notice now it’s twenty five point four one percent so it wasn’t as big of a decrease onto your net profit but it was still a pretty significant hit of about two percent almost and let’s see the trade fees on this one were 1922 so you can see that when you’re trading on these shorter timeframes that a lot of times it will trigger more trades and that’s something to be mindful of and that’s one of the main impacts that I wanted you to see not only are you working with these fees and you’re having larger fee amounts but because you’re working on the shorter timeframes the reason you’re having those larger fee amounts is because you’re getting in out of treitz quicker depending on your strategy so if you have a strategy like this where you try to use it on a 15-minute and also on a 4-hour resolution what’s gonna happen is you’re gonna be entering and exiting on your positions more often which is going to create a lot more trade fees it’s gonna make it harder to be profitable so when you are doing your strategies and trading view make sure you set a commission value that’s reasonable for your exchange now I’m actually going to remove the Commission the Commission value and we are going to take a look at how slippage actually would affect how your strategy performs now as I mentioned slippage would be the difference between where you would ideally enter and where the actual entry would be now if you’re actually ordering this would be for example if you were to make a market order that was large enough to eat through the order books by a certain amount and your average price for your entry was a little bit higher than what you expected now on trading view with the strategies you can actually use it to try and nail a better more realistic version of your entries on these so this the setting for slippage actually only takes a whole integers excuse me I kind of got a loss for words there for a moment but it only takes whole integers so how would you account for a slippage of you know 50 cents here well it actually uses the the minimum tick size for the chart so on this particular chart the minimum tick size appears to be I believe it’s a penny but let’s let’s see let’s enter in 10 and let’s save this okay so you notice it didn’t change things much so it probably is a penny so let’s set it to 200 and it should be a $2.00 difference you you you see at a 9607 and in your entry that’s really hard to tell here because it’s so volatile so actually go back look at something a little less volatile okay so when you see here the open was 92 87 and your actual entry was 92 89 or so it’s really hard to tell on this particular chart so let’s actually increase that slippage by about much more let’s actually try to make it $20 okay so now you can tell your entry is 92 87 and your actual entry is 93 oh seven most likely it’s just kind of hard to get that precision on this particular chart so you kind of get a feel for what slippage actually does so for example if you tried to enter on this particular one your slippage would have caused your actual entry price to be higher on your lungs and lower on your shorts by the slippage amount and just remember this is by ticks so let’s actually set this back to $1 so let’s pretend every order we make slips the price $1 let’s save that let’s go to our strategy tester okay so now instead of losing one point five eight percent we’re actually losing 2.0 five percent because our entries are worse due to the slippage so that is also something to keep in mind now let’s go back and excuse me let’s go back here and then let’s go to the 4-hour chart I thought I was getting ahead of myself and I was we were on the 4-hour chart now this one is twenty three point nine four percent now remember this one doesn’t trade as much so you’re not having that slippage as many times so it won’t impact it as much on these slower resolutions like this now what we’re going to do now is we’re actually going to combine the two and see how much works it makes it so we’ll have a dollar slippage and we’ll have 0.1 Commission value save that let’s go back to our 15-minute chart first of all let’s look at the strategy and now instead of losing 1.5 eight percent is losing five point nine so the entries are worse because of the slippage and then you’re also paying this high value in fees as well so this is something that’s very important to keep in mind when you’re using trading view to create your strategies and let’s take a look at the four hour and of course this shouldn’t have as large of an impact and really doesn’t it’s twenty five point eight five so it’s about two and a quarter percentage or so worse as opposed to the 15-minute chart was about three or four percent more loss than this so hopefully you’ve gained something from this video and of course this is not financial advice although the principles of how this actually applies is true the more you trade with the fees the more fees you would have and then of course with the slippage you would have worse prices and then when you combine the two together it just makes things even worse so please be mindful of that when you’re creating your strategies on trading for you and it’s like you all got it braved notification bring my head back on here I was just about to do that anyway but so now you should have a very good idea of how the trade fees and also the slippage impacts your strategies on trading view and how that will impact your total profit at the end of the strategy now if you have any questions please leave a comment in the video if you have any ideas for other videos please leave a comment I’ve already mentioned the pine script tutorial series where we talked about creating these strategies entirely from scratch but other than that if you’ve liked this video please leave a like if you haven’t already check out the other videos but also consider subscribing while you’re down there hitting the like button because I’m gonna have other videos very similar to this one and also more pine script tutorials coming up in the future so I appreciate you watching the video thanks and have a great day [Music]

YouTube Video Description

< br/> ???? IMPORTANT LINKS BELOW ????

Trade Fee and Slippage Impact in a TradingView Strategy: In this TradingView Pine Script Tutorial we discuss how to account for trade fees and slippage in a strategy on TradingView and how these settings can make a major difference to your end results. With Pine Script it is very easy for even beginners to create their own indicators or strategies that have many other indicators within them. Once we have completed the script, we can see our results immediately and begin working with more functions, indicators, and strategies.

??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️
Social and other public profiles
??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️??‍♂️
? Website: https://bigbits.io
? Discord: https://discord.gg/rapMn4z
? Twitter: https://twitter.com/BigBitsIO
? Facebook: https://www.facebook.com/BigBitsIO/
?‍?GitHub: https://github.com/BigBitsIO
?TradingView: https://www.tradingview.com/u/BigBitsIO

???????????
Referral links
???????????
? Buy, Sell and Trade Crypto on Binance.US with LOW fees: https://www.binance.us/?ref=35105151
?‍♂️ Want to buy crypto? Get $10 of bitcoin w/ your first purchase over $100: https://www.coinbase.com/join/johnso_dxz
? Sign up for a paid plan at TradingView and receive a $30 credit: https://www.tradingview.com/gopro/?share_your_love=BigBitsIO
? Browse privately and get rewarded with Brave Browser: https://brave.com/big406
? Receive bonus perks when purchasing Lightnite Game: https://lightnite.io/ref=BigBits
VIEW ALL HERE: https://bigbits.io/bigbits-referrals/

❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️
DISCLAIMER: All my videos are for educational and entertainment purposes only. Nothing in this or any of my videos should be interpreted as financial advice or a recommendation to buy or sell any sort of security or investment including all types of crypto coins and tokens. Consult with a professional financial advisor before making any financial decisions. Investing in general and particularly with crypto trading especially is risky and has the potential for one to lose most or all of the initial investment. In simple terms, you are responsible for your actions when trading.
❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️❗️

#bitcoin #crypto #cryptocurrencies #tradingview #binance #binanceUS #coinbase

This channel focuses on Bitcoin, Ethereum, LiteCoin, Ripple, Link, Basic Attention Token and almost all cryptocurrencies that demand attention. Please like the video if you liked the video, and subscribe if you like these types of videos. David from BigBits is an experienced Software Engineer, but no one is perfect, If you find any issues with any of the open-source, free code, or code shown in videos please comment to let us know what to fix, we listen to our viewers!