[..]
Problem: While my indicator is running, if I modify some value in my text file, these one are not reflected in the print command, Print(TextFile); New value will be display only after I turned off then turn on the indicator.
[..]
Haven't worked with the type of situation you describe, but if I make some modest suggestions (probably you've already tried them):
- Do you keep the text file open after modifying these values? As you describe it, MC seems to access and older (temporary) version of the file, since it doesn't has access (any more) to the current version.
- Perhaps two lists could work? One for reading, then copying to second list, then forcing ELCollections to release (see List.Release()) the first list (and thus removing the lock from the file), and then making a new connection with list one to the text file, to get the newest version.
Normally you don’t have to worry about cleaning up collections yourself: the ELCollections utility will do it for you automatically when a study or strategy is unloaded. However, there may be times when you want to create a temporary collection, do some work with it, and then delete it to save memory. You can do this with the Release function:
Value1 = ListX.Release(ID) or
Value1 = MapXY.Release(ID)
If you release a local collection (created with New), it will be deleted immediately. If you release a shared collection (created with Share), it will be deleted only when it has been released by all studies and strategies that use it.
New value will be display only after I turned off then turn on the indicator.
Hope I said something useful.
Regards,
Josh