Here is my errors:/ what am i doing wrong? Any idea?
Using the updated version of script and try to save it with both “CC_SuperTrendExt” and “SuperTrendExt” names as command script
455. 19 Jul 2022 12:19:00 ERROR: OptimizedForInterval(): Execution error occurred.
454. 19 Jul 2022 12:19:00 ERROR: Index out of range exception.
453. 19 Jul 2022 12:19:00 ERROR: Plot(): Attempting to call with ‘null’ value for value.
452. 19 Jul 2022 12:19:00 ERROR: CC_SuperTrendExt(): Invalid input count of 5 (requires 6 inputs).
451. 19 Jul 2022 12:19:00 ERROR: CC_SuperTrendExt(): Invalid input count of 5 (requires 6 inputs)
Solved. Thank you @Tilanthi (Discord) for your guide
Depending on which version of SuperTrendExt you are using, try adding the ClosePrices() into the supertrend call in your main script as the third callable parameter, which gives you the six inputs that it is looking for – so for example
local c = ClosePrices(tf_price)
local st = CC_SuperTrendExt(h, l, c, st_src, st_atr_len, st_atr_mul)
and hopefully it should work for you – it did when I just tried it !
-
This reply was modified 1 year, 9 months ago by Katerin. Reason: Solved