Hello, I'm sure this is an easy one for you guys,
How do I add an alert to the below partial script? I know the text should be Alert ("Bullish") or Alert ("Bearish") but if I insert this after the arw_new I get an error?
condition1 = var2 crosses over 0 and Price > var3 ;
if condition1 then
value1=arw_new(date,time,low,false),
Alert ("Bullish")
else
begin
condition1 = var2 crosses under 0 and Price < var3 ;
if condition1 then
value1=arw_new(date,time,high,true),
Alert ("Bearish")
;
end;
Two Alert signals
-
- Posts: 79
- Joined: 28 Mar 2013
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Re: Two Alert signals
use more semicolons and
then begin
...
end;
then begin
...
end;
Code: Select all
condition1 = var2 crosses over 0 and Price > var3 ;
if condition1 then begin
value1=arw_new(date,time,low,false);
Alert ("Bullish")
end else begin
condition1 = var2 crosses under 0 and Price < var3 ;
end
if condition1 then begin
value1=arw_new(date,time,high,true);
Alert ("Bearish");
end;