Because the file is not ready jet. Sleep does not work in indicators, as much as I know.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have an exe file that i created in python (Start.exe) which when executed manually generates two files "a data file" and "a template file".
now i am trying to automate that process by executing "Start.exe" from the indicator and then Load the template that the "Start.exe" generated.
But when I run the indicator , only then it loads the template on the second attempt and not on the first attemp (in second attempt it creates the files and then apply the template ).
in the templates folder i can see that it generates "a data file" and "a template file" on the first attempt.
which means the "ShellExecuteW()" command is working fine and "Start.exe" is executing correctly, so it should sleep for 5 seconds and then apply the newly created chart template
But thats not happening , it creates the template and then nothing , and when i attach the indicator to the chart again (second time)
only then it apply the template.
Here is the indicator code:
Same case with 3rd and 4th attempt , meaning this attempt will only create the files , and wont load the template
and 4th attempt will create the files and apply the template