OPEN-SOURCE SCRIPT
Actualizado MACD 50x Leveraged Short Strategy with Real Equity

Hello there ,
Short version of the Macd Long strategy.
MACD Long strategy:

Adding margin: Forbidden or not specified. (Add Margin : No)
- Position size: (for each trade) 1%
- Stop-Loss: (2% Above Entry Level)
- Long: macd crossunder
- Exit: macd crossover
Or ofc touching the stop-Loss value as predicted.
These strategies are just examples.
The goal is to observe true equity and equity change.
Warning: This strategy simulation is for Short direction only.
Regards.
Notas de prensa
Update : Net capital bug fixed.Notas de prensa
We forgot to add principal position size if we win. (Line 92)The previous version was wrong.
Because this algorithm saw the starting position size as a loss. ( It was only taking into account the profit on position size.)
I also designed the percentage profit calculation much simpler.
I will do this update when I have enough time.
NOTE : My last script needs same update and its a bit complicated. It is easy but i want my codes to be simple and understandable.
Both the percentage profit command I specified and the place that is wrong and fixed in these two scripts will be fixed in the duplex macd system.
I'll update him when I have time.
My last script :

Notas de prensa
Apology!The old version was correct.
Because change (strategy.position size) is used.
There is no need to add principal position size again.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no pretenden ser, ni constituyen, asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no pretenden ser, ni constituyen, asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.