It is generalized but if you want to go play with the values. I will continue to develop this further and am happy to receive feedback.
Notations are coming.
-ONLY use this with TV_GAIN: 0.6 because on downtrends it is supposed to double up to pull down the average bought price!
-Use "buying condition" and "selling condition" for alerts, trigger on close and I suggest you use 3 min intervals but try what looks good to you
-Use this on pairs that are curvy and have atleast 0.6% gain between buy/sell triggers. This is also general advise when you want to take microprofits.
-Don't be confused with sell arrows, it will only trigger the bot sell on gain when you've set TV_GAIN
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.