View Single Post
  #19 (permalink)  
Old 06-24-2007, 12:16 PM
fxbs fxbs is offline
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
fxbs is on a distinguished road
arsioma bells&wissles

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; xpma has switching options
4 now, some mods 2 make it more user-friendly, tell me what you think:

------------------------------------------------
Not an ind. , just pieces of code!

#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;

--//-- Not an ind. , just pieces of code!
Attached Images
File Type: gif arsioma3.gif (27.8 KB, 3430 views)

Last edited by fxbs; 08-01-2007 at 03:52 AM.
Reply With Quote