[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Trailing Stop with email alert!!!



PureBytes Links

Trading Reference Links

 // Jim Berg's ATR Trailing Stops
  // Ref: Jim Berg - The Truth About Volatility - TASC-2005-Feb
  // Ref: http://www.amibroker.com/members/traders/02-2005.html

  LongSignal = C > ( LLV( L, 20 ) + 2 * ATR( 10 ) );
  ShortSignal = C < ( HHV( H, 20 ) - 2 * ATR( 10 ) );

  LongStopValue = HHV( C - 2 * ATR(10), 15 );
  ShortStopValue = LLV( C + 2 * ATR(10), 15 );

  LongStopLine = 
  IIf(LongSignal AND ShortSignal, Null, 
  IIf(LongSignal, LongStopValue, 
  Null));

  ShortStopLine = 
  IIf(LongSignal AND ShortSignal, Null, 
  IIf(ShortSignal, ShortStopValue, 
  Null));

  Title = "\\c11"+Interval(format=2)+" "+Date()+"\\c26 "+C;

  Plot(LongStopLine, "", colorLime, styleStaircase );
  Plot(ShortStopLine, "", colorRed, styleStaircase );

  Plot(C, "", colorViolet, styleCandle);
  SetChartOptions(0, chartShowDates);
  GraphXSpace = 2;

I actually use this AFL for the trailing stop, how can I add a 
function like, if the price hit the low stop (in case of long), the 
Amibroker send a email to me?? or (in case of short), price hit the 
upper stop.

Thanks in advance.

Michael.



Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/