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

[amibroker] convert to amibroker



PureBytes Links

Trading Reference Links

Hi,
 
I am using metatrader for past 2 years , i m using a indicator its very usefull to me , i want to use the same indicator in amibroker also,  please convert this program to amibroker(.afl) it is very useful for me and everyone in this group.
 
//================      Meta trader program to find support and resistance ===================

#property copyright "Support and Resistance"
#property link      ""
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Blue
//---- buffers
double v1[];
double v2[];
double val1;
double val2;
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int init()
  {
//----
   IndicatorBuffers(2);
   SetIndexArrow(0, 119);
   SetIndexStyle(0,DRAW_ARROW,STYLE_DOT,1,Red);
   SetIndexBuffer(0, v1);
   SetIndexLabel(0,"Resistance");
   SetIndexArrow(1, 119);
   SetIndexStyle(1,DRAW_ARROW,STYLE_DOT,1,Blue);
   SetIndexBuffer(1, v2);
   SetIndexLabel(1,"Support");
//----
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  {
   int i=Bars;
//----
   while(i>=0)
     {
      val1=iFractals(NULL, 0, MODE_UPPER,i);
      if (val1 > 0) v1[i]=High[i];
      else          v1[i]=v1[i+1];
      val2=iFractals(NULL, 0, MODE_LOWER,i);
      if (val2 > 0) v2[i]=Low[i];
      else          v2[i]=v2[i+1];
     
      i--;
     }
//----
   return(0);
  }
//+------------------------------------------------------------------+


Add more friends to your messenger and enjoy! Invite them now. __._,_.___

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL 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

*********************************




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___