Pages:
Actions
  • #1 by fonecorp on 02 May 2024
  • Hi there

    Writing a value into a text file using a trigger is straight forward using the 'Write to a file' action. Is it possible to read a value from a text file using a trigger?

    Regards
    Paul Fone
  • #2 by MarkV on 04 May 2024
  • Hi
    Yes can read a value from a text file.
    for example:
    selections index is in file
    see comparison operator in helpfile for description

    If you have specific values for each selection the values can be imported
    see importing selections for autotrading in the helpfile
    an example is in Item 5 here.
  • #3 by fonecorp on 06 May 2024
  • Hi Mark

    I understand you can import values associated with a selection by importing selections for autotrading, but I still cannot see how I can load a value from a text file when it is not related to a selection name

    Eg. Save an account balance on a certain day using the 'write to a file'  trigger action, then use another action to recall this same value on another day. I know you can remember this value using the 'set user variable' action or the 'remember' action but none of these can be recalled if marketfeeder stops and is reloaded

    Regards
    Paul Fone
  • #4 by MarkV on 06 May 2024
  • Hi Paul
    The way to do this is to add a constant and change "start with initial value" to "remember last value". Then use a trigger to set a user variable with the same name as the constant. It will retain the last value when MFP is shut down.
  • #5 by fonecorp on 08 May 2024
  • Thankyou Mark
Pages:
Actions