hi
i build the attached strategy in java code with jforex desktop, the
strategy have to play a sound (pin.wav) when it's found a pin on timeframe
15min/30min/1h/4h on major and minor pairs
For this implementation i followed this example:
https://www.dukascopy.com/wiki/#Create_Alertwhen i run it on jforex desktop, i get the error message:
access denied File permission on pin.wav (see the attached image
errosound.png)
i run the strategy in local mode
why? i have full permission on that file
i use windows 7 as operation system, and i'm administrator of my pc
i use this code to play the sound:
public File wavFile = new File("C:\\Temp\\pin.wav");
private void playSound(File wavFile) {
try {
AudioInputStream audioInputStream =
AudioSystem.getAudioInputStream(wavFile);
AudioFormat af = audioInputStream.getFormat();
int nSize = (int) (af.getFrameSize() *
audioInputStream.getFrameLength());
byte[] audio = new byte[nSize];
DataLine.Info info = new DataLine.Info(Clip.class, af, nSize);
audioInputStream.read(audio, 0, nSize);
Clip clip = (Clip) AudioSystem.getLine(info);
clip.open(af, audio, 0, nSize);
clip.start();
} catch (Exception e) {
e.printStackTrace();
console.getOut().println("error on play: " + e.getMessage());
//throw new JFException(e);
}
}
P.S.
ok i writed the post
i need to use jforex deskton and no visual jforex (vjf) because i want to run my stategy on multi pairs and multi timeframe and i can't do that with vjf
best regards
--
Andrea
