Need help with ShellExecuteW to avoid multiple .exe files open once indicator loaded
Use GlobalVariables.
You are
- Closing your file inside the for loop. All other writes fail. What are Function return values ? How do I use them ? - MQL4 forum
- Shelling inside the for loop for each bar that matched your criteria.
Only check outside the loop. Only sound when the current bar changes criteria not at each tick where is matches a criteria.
WHRoeder:
You are
- Closing your file inside the for loop. All other writes fail. What are Function return values ? How do I use them ? - MQL4 forum
- Shelling inside the for loop for each bar that matched your criteria.
Only check outside the loop. Only sound when the current bar changes criteria not at each tick where is matches a criteria.
I'm not a programmer. Can you pls give me a sample which runs
ShellExecuteW(0,0,"C:\\SellSignal.exe",0,0,5); or ShellExecuteW(0,0,"C:\\BuySignal.exe",0,0,5);
just 1 time while load the indicator then just 1 time whenever has a new signal occurs?
Problem Solved....
Solution is
if(Bars>alertBar){ShellExecuteW(0,0,"C:\\BuySignal.exe",0,0,5);alertBar = Bars;} or if(Bars>alertBar){ShellExecuteW(0,0,"C:\\SellSignal.exe",0,0,5);alertBar = Bars;}
|
buxboy4: I'm not a programmer. Can you pls give me a sample which runs just 1 time while load the indicator then just 1 time whenever has a new signal occurs? |
|
Please help me with this indicator which provides buy/sell audio alert. I try to do some modification to this indicator in order write a file and run a external .EXE file. The write file code is working fine but once I load the indicator it just open the so many .exe until the computer is hang. How to make this indicator below to just open 1 .exe file for the latest signal when i load the indicator and just 1 .exe file to following buy/sell signal?