OPEN-SOURCE SCRIPT

SuperFib Enhanced (Array Only)

203
Key Changes:

Removed MAX_LINES and defined const int MAX_STORAGE_CAPACITY = 200 (You can adjust 200 higher or lower, but be mindful of the total drawings limit).

Removed all individual inputs (show1-show10, price1-price10, text1-text10) and their corresponding groups. The array input is now the only way to define levels.

Removed the useArrayInput boolean input, as it's no longer needed.

Initialized var hLines and var lineLabels arrays with MAX_STORAGE_CAPACITY.
Modified the array parsing loop to respect MAX_STORAGE_CAPACITY when adding parsed levels.
Modified the main drawing loop (if barstate.islast) to iterate from 0 up to

MAX_STORAGE_CAPACITY - 1. Inside the loop, it checks if i < parsedLevelsCount to determine if a line should exist at that index.

Modified the real-time update loop (if barstate.isrealtime) to also iterate up to MAX_STORAGE_CAPACITY - 1 to handle any potential drawing index within the indicator's capacity.

Updated the tooltips for the array inputs to reflect that this is the primary method and mention the (increased) capacity limit.


This version is more flexible for users who rely heavily on array input, allowing them to define up to 200 levels. Remember that while the indicator itself can manage 200, the total drawings on your chart from all sources still cannot exceed Pine Script's platform-wide limit.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.