En route to being absolutely the best and most complete trading platform out there, TradingView has just closed 2 gaps in their PineScript language.
It is now possible to create and backtest a strategy for trading with leverage.
Backtester now produces Margin Calls - so recognizes mid-trade drawdown and if it is too big for the broker to maintain your trade,...
ELEVATED LEVERAGE index SYSTEM (ELiS) tries to solve the problem of adjusting meaningful leverage in futures and margin trading.
The biggest problem for traders is adjusting the leverage level manually.
Concerning about the volatilities it's very hard to set a meaningful leverage level.
ELiS includes 4 different volatility component which are:
Margin Sniper uses 2 levels for overbought and oversold to overlay possible trades on the chart. You can adjust its sensitivity by either increasing or decreasing the overbought and oversold threshold numbers. It must meet one of these levels and the short-term trend has to change direction for it to create the alert and entry on the overlay.
I started this script as a joke for someone... finally appears it could be used for educational content
Let's talk about leverage and margin call
A margin call is the broker's demand that an investor deposit additional money or securities so that the account is brought up to the minimum value, known as the maintenance margin.
Almost identical to the one I published before, but this one includes short orders as well.
I didn't spend much time backtesting, so there may be a different set of parameters that gives better results. Please let me know if you find something!
This is the popular Bitfinex margin Longs/Shorts overlay script made compatible with other exchanges. So you can for example use it with BitMEXT XBTUSD and it will still plot Bitfinex BTCUSD.
It always plots data for the same currency pair, so for ETHUSD of any exchange, it will always plot Bitfinex ETHUSD margin data.