TradingView
gnalis
Jan 25, 2023 8:31 PM

Profitable Supertrend v0.1 - Alpha 

CVXUSDT Perpetual ContractBybit

Description

This a script to try detect the best combination of supertrend parameters in a space of time. Sadly the script is slow. Evaluate all possibilities params is hard for a pinescript and my knowledge too. In some cases, when you want evaluate many time could be the script fails for timeout. Perhaps with time I could enhance. For this problem of speed the calculate of combinatios it's not complete: In factor use a increment of 0.2 in each param (0.1, 0.3, 0.5 ...) in period the increment for each value is 3. The range for factor it's from 3.0 to 12.0. The range of period it's from 10 to 43

My knowledge don't let me go more far. Perhaps with time I can enhance the script.
Comments
wbburgin
Love it. Have you thought about simplifying it with some for loops inside the matrices? That way you won’t have to write out all the combinations
raja74sekhar
It is not available in favourite
gnalis
@raja74sekhar, what do you mean?
raja74sekhar
@gnalis, indicator not display on chart it show at bottom of chart
gnalis
@raja74sekhar, yes, that's right. The indicator it shows at bottom. Prints the best combination of factor and period of supertrend, in the time than you have in settings. In another indicator than I´ll post in future, it shows more information of selected supertrend values. That indicator will be a complement of this, to give much more information of supertrend results. That other indicator will show te information in top right, like you can see in image.
More