OPEN-SOURCE SCRIPT
Updated MACD 50x Leveraged Long Strategy Results with Real Equity

Hello there.
I was looking for a way to simulate leveraged transactions in Tradingview and this script came out.
You can examine the equity graph without looking at the strategy results.
Thus, the facts will come to light.
Strategy parameters:
Adding margin: Forbidden or not specified. (Add Margin : No)
Or ofc touching the stop-Loss value as predicted.
Warning: This strategy simulation is for Long direction only.
Regards.
I was looking for a way to simulate leveraged transactions in Tradingview and this script came out.
You can examine the equity graph without looking at the strategy results.
Thus, the facts will come to light.
Strategy parameters:
Adding margin: Forbidden or not specified. (Add Margin : No)
- Position size: (for each trade) 1%
- Stop-Loss: (2%)
- Long: macd crossover
- Exit: macd crossunder
Or ofc touching the stop-Loss value as predicted.
Warning: This strategy simulation is for Long direction only.
Regards.
Release Notes
Correction in line 37:98% of the average entry price is taken as the Stop-Loss value.
(2% below the average entry price)
Release Notes
Net capital bug fixed.Release Notes
We forgot to add principal position size if we win. The previous version was wrong.
Because he saw the starting position size as a loss.
I also designed the percentage profit calculation much simpler.
I will do this update when I have enough time.
Release Notes
Apology! I was skeptical after high success rates.
The old version was correct.
Change (Strategy.position_size) statement already adds prinsipal position size.
Update cancelled.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.