This is an old and incomplete script that is being pulled up and dusted off as per request. The sole purpose of this script was to provide code snippets allowing one to easily convert their own script/strategy to include incremental order sizes. More control over your pyramiding orders. **It may repaint, and was not intended for trading but more as an attempt...
Version 3 for you guys, just add to favorites and you can use. Only 36 trades since 2017, since that is when the backtesting began. I made the commission more realistic, now it is about 37 pips per trade. Only works on gold, (XAUUSD). Trend Following as you can see. 1 contract size, 1 trade at a time, good proof of how being correct less than a third of the...
This strategy improves on the latest one that I posted in several ways. the %profit is reduced by 3% Success rate reduced by 2% Drawdown decreased by half (from 40% to 20%) Average trade $ increased by $500
*** THIS IS JUST AN EXAMPLE OF STRATEGY TIME LIMITING CODE IMPLEMENTATION *** This is a follow up to my example for risk management implementation here: Code remains mostly unchanged, but now includes a time limiting implementation. Relevant code blocks for the time factor are preceded with a comment stating: *** FOCUS OF EXAMPLE *** Cheers!
*** THIS IS JUST AN EXAMPLE OF STRATEGY RISK MANAGEMENT CODE IMPLEMENTATION *** For my own future reference, and for anyone else who needs it. Pine script strategy code can be confusing and awkward, so I finally sat down and had a little think about it and put something together that actually works (i think...) Code is commented where I felt might be necessary...
Buy bullish engulfing above EMA 24 Sell bullish engulfing below EMA 24 Mercurius A.M.