[amibroker] Re: Need help in suppressing multiple sound alarms and scanning ALL Scrips for MA

2010-07-10 Thread Bobby R
Hey JollyPollyAnna

Thanks a tonne...for your help. Will add your suggestion to the code and check
And one more thing...I LIKED YOUR NAME VERY MUCH...CUTE NAME...

Thanks once again...
Bobby

--- In amibroker@yahoogroups.com, jollypollyanna jollypolly...@... wrote:

 --- In amibroker@yahoogroups.com, Bobby R bobby6910@ wrote:
 
  Hello,
 
  Can someone please help me with the following scrip. I have a problem,
 wherein thru' AA, with timeframe 5 min,when I scan, I get the scrips in
 the Alert Outputwindow. But the scrip tab which is Open,gives multiple
 sound alert repeatedly.
  Can someone help me to recode the same for :
  1) Give alarm only once whenever applicable.
  2) The AlertOutput window gives a Down RED Color arrow even if it is a
 BUY signal, whereas I'm looking for a GREEN Up arrow (All this is in the
 scripname side).
 
  Awaiting reply.
 
  warm regards...Bobby
 
 Bobby, I added the correct type  flags for the AlertIf function.
 That
 is 1 = Buy, 2 = Sell, 3 = Short, 4 = Cover.
 The 4+8 flags stops repetition. Look up the function for a better
 explanation.
 
 UpCdl=Open  Close;
 DnCdl=Close  Open;
 
 Buy = Cross(MA(Close, 5),MA(Close, 20)) AND UpCdl;
 Sell = Cross(MA(Close, 13),MA(Close, 5)) AND DnCdl;
 Short = Sell;
 Cover = Buy;
 
 Buy = ExRem(Buy, Sell);
 Sell = ExRem(Sell, Buy);
 
 shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
 PlotShapes(shape, IIf(Buy, colorGreen, colorRed), 0, IIf(Buy, Low,
 High));
 
 AlertIf( Buy, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main
 Indicators\\chimes.wav, Buy, 1, 4+8);
 AlertIf( Sell, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main
 Indicators\\siren.wav, Sell, 2, 4+8);





[amibroker] Re: Need help in suppressing multiple sound alarms and scanning ALL Scrips for MA

2010-06-11 Thread Rob
Easy Booby... you just need to post once!

--- In amibroker@yahoogroups.com, Bobby R bobby6...@... wrote:

 Hello,
 
 Can someone please help me with the following scrip. I have a problem, wherein
 thru' AA, with timeframe 5 min,when I scan, I get the scrips in the Alert
 Outputwindow. But the scrip tab which is Open,gives multiple sound alert
 repeatedly.
 Can someone help me to recode the same for :
 1) Give alarm only once whenever applicable.
 2) The AlertOutput window gives a Down RED Color arrow even if it is a BUY
 signal, whereas I'm looking for a GREEN Up arrow (All this is in the scripname
 side).
 
 Code: (BUY 5MA crossover 20MA and vice versa)
 
 **
 _SECTION_BEGIN(Price);
 SetChartOptions(0,chartShowArrows|chartShowDates);
 _N(Title = StrFormat({{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g,
 Close %g (%.1f%%) {{VALUES}}, O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
 Plot( C, Close, ParamColor(Color, colorBlack ), styleNoTitle |
 ParamStyle(Style) | GetPriceStyle() );
 _SECTION_END();
 
 _SECTION_BEGIN(Volume);
 Plot( Volume, _DEFAULT_NAME(), ParamColor(Color, colorBlueGrey ), 
 ParamStyle(
 Style, styleHistogram | styleOwnScale | styleThick, maskHistogram ), 2 );
 _SECTION_END();
 
 _SECTION_BEGIN(MA);
 P = ParamField(Price field,-1);
 Periods = Param(Periods, 15, 2, 300, 1, 10 );
 Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( Color, colorCycle ),
 ParamStyle(Style) );
 _SECTION_END();
 
 _SECTION_BEGIN(MA1);
 P = ParamField(Price field,-1);
 Periods = Param(Periods, 15, 2, 300, 1, 10 );
 Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( Color, colorCycle ),
 ParamStyle(Style) );
 _SECTION_END();
 
 _SECTION_BEGIN(MA2);
 P = ParamField(Price field,-1);
 Periods = Param(Periods, 15, 2, 300, 1, 10 );
 Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( Color, colorCycle ),
 ParamStyle(Style) );
 _SECTION_END();
 
 UpCdl=Open  Close;
 DnCdl=Close  Open;
 
 Buy = (Cross(MA(Close,5),MA(Close,20))) AND (upcdl);
 Sell = (Cross(MA(Close,13),MA(Close,5))) AND (dncdl);
 
 shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
 PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) 
 );
 
 Buy = ExRem( Buy, Sell );
 Sell = ExRem( Sell, Buy );
 
 Cover = Buy;
 Short = Sell;
 
 AlertIf( Buy, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main
 Indicators\\chimes.wav, Buy, 2 );
 AlertIf( Sell, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main
 Indicators\\siren.wav, Sell, 2 );
 *
 
 Awaiting reply.
 
 warm regards...Bobby





[amibroker] Re: Need help in suppressing multiple sound alarms and scanning ALL Scrips for MA

2010-06-11 Thread jollypollyanna

--- In amibroker@yahoogroups.com, Bobby R bobby6...@... wrote:

 Hello,

 Can someone please help me with the following scrip. I have a problem,
wherein thru' AA, with timeframe 5 min,when I scan, I get the scrips in
the Alert Outputwindow. But the scrip tab which is Open,gives multiple
sound alert repeatedly.
 Can someone help me to recode the same for :
 1) Give alarm only once whenever applicable.
 2) The AlertOutput window gives a Down RED Color arrow even if it is a
BUY signal, whereas I'm looking for a GREEN Up arrow (All this is in the
scripname side).

 Awaiting reply.

 warm regards...Bobby

Bobby, the EXREM function alters the AlertIf output so I blocked it and
also added the correct type  flags for the AlertIf function. That
is 1 = Buy, 2 = Sell, 3 = Short, 4 = Cover.
The 4+8 flags stops repetition. Look up the function for a better
explanation.  I also added an alert for the Short and Cover while you
can add a different SOUND for them.

UpCdl=Open  Close;
DnCdl=Close  Open;

Buy = (Cross(MA(Close, 5),MA(Close, 20))) AND UpCdl;
Sell = (Cross(MA(Close, 13),MA(Close, 5))) AND DnCdl;
Short = Sell;
Cover = Buy;

//Buy = ExRem(Buy, Sell);
//Sell = ExRem(Sell, Buy);
//Buy = ExRem(Short, Cover);
//Sell = ExRem(Cover, Short);

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes(shape, IIf(Buy, colorGreen, colorRed), 0, IIf(Buy, Low,
High));

AlertIf( Buy, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main
Indicators\\chimes.wav, Buy, 1, 4+8);
AlertIf( Sell, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main
Indicators\\siren.wav, Sell, 2, 4+8);
//AlertIf( Short, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB
Main Indicators\\siren.wav, Sell, 3, 4+8);
//AlertIf( Cover, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB
Main Indicators\\chimes.wav, Sell, 4, 4+8);





[amibroker] Re: Need help in suppressing multiple sound alarms and scanning ALL Scrips for MA

2010-06-11 Thread jollypollyanna

--- In amibroker@yahoogroups.com
../../../../post?postID=tZS8P7EA9OVTrt5y32-kyiN7i6wuKNGiYOztue0QWMCWCTN\
nv_Vn_eyk-Yp6ywBujjYTfRtp-fBaFvSfcKPd ,  Bobby R bobby6...@...
wrote:

 Hello,

 Can someone please help me with the following scrip. I have a 
problem,
wherein thru' AA, with timeframe 5 min,when I scan, I get the scrips in
the Alert Outputwindow. But the scrip tab which is Open,gives multiple
sound alert repeatedly.
 Can someone help me to recode the same for :
 1) Give alarm only once whenever applicable.
 2) The AlertOutput window gives a Down RED Color arrow even if it  is
a
BUY signal, whereas I'm looking for a GREEN Up arrow (All this is in the
scripname side).

 Awaiting reply.

 warm regards...Bobby

Bobby, the EXREM function alters the AlertIf output so I blocked it and
also added the correct type  flags for the AlertIf function.  That
is 1 = Buy, 2 = Sell, 3 = Short, 4 = Cover.
The 4+8 flags stops repetition. Look up the function for a better
explanation. I also added an alert for the Short and Cover while you
can add a different SOUND for them.

UpCdl=Open  Close;
DnCdl=Close  Open;

Buy = (Cross(MA(Close, 5),MA(Close, 20))) AND UpCdl;
Sell = (Cross(MA(Close, 13),MA(Close, 5))) AND DnCdl;
Short = Sell;
Cover = Buy;

//Buy = ExRem(Buy, Sell);
//Sell = ExRem(Sell, Buy);
//Buy = ExRem(Short, Cover);
//Sell = ExRem(Cover, Short);

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes(shape, IIf(Buy, colorGreen, colorRed), 0, IIf(Buy, Low,
High));

AlertIf( Buy, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main
Indicators\\chimes.wav, Buy, 1, 4+8);
AlertIf( Sell, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main
Indicators\\siren.wav, Sell, 2, 4+8);
//AlertIf( Short, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB
Main Indicators\\siren.wav, Short, 3, 4+8);
//AlertIf( Cover, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB
Main Indicators\\chimes.wav, Cover, 4, 4+8);




[amibroker] Re: Need help in suppressing multiple sound alarms and scanning ALL Scrips for MA

2010-06-11 Thread jollypollyanna

--- In amibroker@yahoogroups.com, Bobby R bobby6...@... wrote:

 Hello,

 Can someone please help me with the following scrip. I have a problem,
wherein
 thru' AA, with timeframe 5 min,when I scan, I get the scrips in the
Alert
 Outputwindow. But the scrip tab which is Open,gives multiple sound
alert
 repeatedly.
 Can someone help me to recode the same for :
 1) Give alarm only once whenever applicable.
 2) The AlertOutput window gives a Down RED Color arrow even if it is a
BUY
 signal, whereas I'm looking for a GREEN Up arrow (All this is in the
scripname
 side).

 Awaiting reply.

 warm regards...Bobby


Bobby, the EXREM function alters the AlertIf output so I blocked it and
also added the correct type  flags for the AlertIf function.  That
is 1 = Buy, 2 = Sell, 3 = Short, 4 = Cover.
The 4+8 flag stops repetition. Look up the function for a better
explanation. I also added an alert for the Short and Cover while you
can add a different SOUND for them.

UpCdl=Open  Close;
DnCdl=Close  Open;

Buy = (Cross(MA(Close, 5),MA(Close, 20))) AND UpCdl;
Sell = (Cross(MA(Close, 13),MA(Close, 5))) AND DnCdl;
Short = Sell;
Cover = Buy;

//Buy = ExRem(Buy, Sell);
//Sell = ExRem(Sell, Buy);
//Short = ExRem(Short, Cover);
//Cover = ExRem(Cover, Short);

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes(shape, IIf(Buy, colorGreen, colorRed), 0, IIf(Buy, Low,
High));

AlertIf( Buy, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main
Indicators\\chimes.wav, Buy, 1, 4+8);
AlertIf( Sell, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main
Indicators\\siren.wav, Sell, 2, 4+8);
//AlertIf( Short, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB
Main Indicators\\siren.wav, Short, 3, 4+8);
//AlertIf( Cover, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB
Main Indicators\\chimes.wav, Cover, 4, 4+8);





[amibroker] Re: Need help in suppressing multiple sound alarms and scanning ALL Scrips for MA

2010-06-11 Thread jollypollyanna
--- In amibroker@yahoogroups.com, Bobby R bobby6...@... wrote:

 Hello,

 Can someone please help me with the following scrip. I have a problem,
wherein thru' AA, with timeframe 5 min,when I scan, I get the scrips in
the Alert Outputwindow. But the scrip tab which is Open,gives multiple
sound alert repeatedly.
 Can someone help me to recode the same for :
 1) Give alarm only once whenever applicable.
 2) The AlertOutput window gives a Down RED Color arrow even if it is a
BUY signal, whereas I'm looking for a GREEN Up arrow (All this is in the
scripname side).

 Awaiting reply.

 warm regards...Bobby

Bobby, I added the correct type  flags for the AlertIf function.
That
is 1 = Buy, 2 = Sell, 3 = Short, 4 = Cover.
The 4+8 flags stops repetition. Look up the function for a better
explanation.

UpCdl=Open  Close;
DnCdl=Close  Open;

Buy = Cross(MA(Close, 5),MA(Close, 20)) AND UpCdl;
Sell = Cross(MA(Close, 13),MA(Close, 5)) AND DnCdl;
Short = Sell;
Cover = Buy;

Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes(shape, IIf(Buy, colorGreen, colorRed), 0, IIf(Buy, Low,
High));

AlertIf( Buy, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main
Indicators\\chimes.wav, Buy, 1, 4+8);
AlertIf( Sell, SOUND C:\\Program Files\\AmiBroker\\Formulas\\ARB Main
Indicators\\siren.wav, Sell, 2, 4+8);