I have been working on many itterations of this script, on multiple time frames, with multiple settings.
It's not exactly how I want it, but if used on the 20 min timeframe (I chose this one to publish, not because it's the most profitable, or percent profitable [I have others that are better in one, or both those respects], but for multiple other reasons.
1) From my back testing, this seems to be the most stable (gives the greatest margin for error). By that I mean, I am not a bot, I am a human trader, so I actually have to sleep, and work, and can't always trade all the time when I when I get my signals. So I need some margin of error.
The 20min time frame gives me this, it's still decently profitable (52K), and allows me some margin of error for being human.
2) It not exactly how I want it, because you have to use it in conjunction with the strategy tester to see if it is in longs or shorts (open trades). You can't see that on the app, or even if you are logged in to TV on a browser on a smart phone. At least I cant, I can only see the strategy tester when I am logged in on my computer, which obviously I can not be all the time.
3) It's also not exactly how I want it because it doesn't tell you when it is switching from buying additional longs (or shorts), and closing them out, and reversing. You can figure this out from the strategy tester, but I would like my script to make it more clear in real time.
4) The alerts on the script only fire after the current bar is closed. So really to use this you need to be a non free member or TV, because then you can add the appropriate RSIs to your chart, and set up real time alerts on them that will fire in real time, as opposed to displaying on the chart after the bar closes (a lot can happen in 20 minutes). Which is sad, and not my intent, I want this to be useful to free members, I just don't know how to do that given they don't have custom time frames (like 20 min), and multiple real time alerts. I can't fix that, that's a limitation of TV.