parameter 'persist'. If it is set to True then static variable will be stored in PersistVars.bin file when AmiBroker is closing and reloaded automatically on next startup, preserving the values of static variables between application runs).
Use and search forum how to implement string with StrExtract()
As per @Tomasz, that's the fastest and efficient way of getting around string data.
No spoon feeding here
You don't need static variables for that. Depending on how much data you have, it can be stored directly in the formula, or it can be imported as artificial ticker or ...dozens of different ways....You can place your data in your formula. You can have different data sets for different symbols and use if-else or switch to pick correct one.
n = Name();
switch( n )
{
case "SBIN": data1 = 1.62;
data2 = 2.62;
break;
case "SUNPHARMA":
data1 = 3.62;
data2 = 4.62;
break;
default:
break;
}
True sir, but most of the times the question is ambiguous and I interpreted at it from a persistent state where reading from a file would be another option.
Nevertheless, your suggestion is an A+