View Single Post
  #21 (permalink)  
Old 06-24-2007, 03:50 PM
NY168's Avatar
NY168 NY168 is offline
Member
 
Join Date: Apr 2007
Location: New York
Posts: 85
NY168 is on a distinguished road
Post Indicator?

Quote:
Originally Posted by fxbs View Post
interesting idea, Kalenzo, do it beckwards...hell not standard
i see soon we gonna add all bells and wissels,- hook it to zlgma, lsma, jma, satl, etc; igorad's nonlag ma has switching options
4 now, some mods 2 make it more user-friendly, tell me what you think:

------------------------------------------------
#property indicator_separate_window
#property indicator_minimum -10
#property indicator_maximum 103
#property indicator_buffers 5
#property indicator_color1 Blue //RSIBuffer
#property indicator_color2 Red //bdn
#property indicator_color3 Green //bup
#property indicator_color4 Magenta //sdn
#property indicator_color5 DodgerBlue //sup
#property indicator_width1 2
//#property indicator_width2 1
#property indicator_width4 2
#property indicator_width5 2
#property indicator_levelcolor Goldenrod
#property indicator_level1 80
#property indicator_level2 50
#property indicator_level3 20

//---- input parameters
extern int RSIOMA = 14;

extern color RSIBufferColor = Blue;
extern color BdnColor= Red;
extern color BupColor = Green;
extern color SdnColor = Magenta;
extern color SupColor = DodgerBlue;

extern string note1 = "RSIOMA Levels";
extern int BuyTrigger = 80;
extern int SellTrigger = 20;
extern int MainTrendLong = 50;
extern int MainTrendShort = 50;
//extern color LevelColor = Yellow;


//---- buffers
double RSIBuffer[];
double PosBuffer[];
double NegBuffer[];

double bdn[],bup[];
double sdn[],sup[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;
//---- 2 additional buffers are used for counting.


IndicatorBuffers(7);

SetIndexBuffer(0,RSIBuffer);
SetIndexBuffer(1,bdn);
SetIndexBuffer(2,bup);
SetIndexBuffer(3,sdn);
SetIndexBuffer(4,sup);

SetIndexStyle(0,DRAW_LINE, RSIBufferColor);
SetIndexStyle(1,DRAW_HISTOGRAM,BdnColor);
SetIndexStyle(2,DRAW_HISTOGRAM,BupColor);
SetIndexStyle(3,DRAW_HISTOGRAM,SdnColor);
SetIndexStyle(4,DRAW_HISTOGRAM,SupColor);

SetIndexLabel(0,"RSIOMA");
SetIndexLabel(1,"Bdn");
SetIndexLabel(2,"Bup");
SetIndexLabel(3,"Sdn");
SetIndexLabel(4,"Sup");

SetIndexBuffer(5,PosBuffer);
SetIndexBuffer(6,NegBuffer);

short_name="RSIOMA("+RSIOMA+")";
IndicatorShortName(short_name);

SetIndexDrawBegin(0,RSIOMA);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Relative Strength Index |
//+------------------------------------------------------------------+
int start()
{
SetLevelValue(0, BuyTrigger);
SetLevelValue(1, SellTrigger);
SetLevelValue(2, MainTrendLong);
SetLevelValue(3, MainTrendShort);
// SetLevelStyle(STYLE_DOT, 1,LevelColor );
// SetLevelStyle(STYLE_DOT, 1,Yellow );



int i,counted_bars=IndicatorCounted();
double rel,negative,positive;

--//--
fxbs,

Can you post the indicator here? I tried to copy your code and it doesn't seem work, which I had a few errors when I complied them.

Thanks!

NY168
Reply With Quote