Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 8/23/2007(UTC) Posts: 25
|
Unless otherwise how can I put alert in expert advisor, to play sound once only for example if the signal is long: c> mov (c, 20 s) and RSI> 70? like the alert sounds to me many times in the same bar, how do I make it play only once, when I have the tone and enough! thanks
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
The simplest method is to switch off the "live bars" or only compute the expert on completed bars, not each tick. If this is not the way you trade then use the gv.dll to store some information about the latest bar and then read that information on each tick; add this to the signals you want; maybe something like: Code:
now:=60*hour() + minute();
newBar:=now<>extfml("gv.getvar","time");
setTime:=extfml("gv.setvar","time",now);
mySignal:=c> mov (c, 20 s) and RSI> 70; {you'll need to fix this up for yourself}
newBar and mySignal;
NOTES: * untested. * will generate an alert on the first tick of the new bar, if that tick (considered to be the close) meets the criteria. wabbit [:D]
|
|
|
|
Rank: Member
Groups: Registered, Registered Users, Subscribers Joined: 8/23/2007(UTC) Posts: 25
|
ok i m trying now thaks for all
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.