Is there a way to have a persistent parameter ?

Created at 05 Jan 2025, 22:04
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
LB

lbellego

Joined 20.06.2024

Is there a way to have a persistent parameter ?
05 Jan 2025, 22:04


Hi,

I made an indicator showinf psychological levels (like 1000, 500, etc). But for some pairs (or indices), the 50 level is toot short, I have to manually put it to show-false with the parameter flag. Is there a way to have a memory for the value regarding the symbol, the parameter name and the timeframe ?

I started to use LocalStorage but how to have a difference between a read form localstorage and a change because the user has changer the parameter value ? It will always read from localstorage… And it is possible to change the parameter value from the localstorage but the parameter ui setting dosen't show the reality because the parameter has it's own memory…

hum…I don't know what to do…except put a button on the graph to disable the 50 level rapidly if necessary.

Regards,

Luc


@lbellego
Replies

firemyst
06 Jan 2025, 00:21

Seems to me you might have to use a second parameter that indicates whether or not you want to use the value from Local Storage (if available, because it might not have been set yet for the current time frame you are on), or use the setting that's chosen in the parameter field.

 

 


@firemyst