Forex



Go Back   Forex Trading > Programming > MetaTrader
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 08-22-2007, 04:34 AM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
fxbs is on a distinguished road
who has extra buffer? or half? 4 Rsioma

Rsioma (RSI of MA) needs one more buffer 4 signals
may be if some wizard have nothing better to do...
i know somehow it possible avoid 8 buff restriction through Maonarray, but i couldn't - didn't finish wizard's school
plus one buffer used only 4 RSI calc... (code, link and indi below)

PS very nice little indi - rsioma
more: Thread RSI of MA pos126 http://www.forex-tsd.com/138096-post126.html
Attached Images
File Type: gif rsioma hhlsx6.gif (17.7 KB, 824 views)
Attached Files
File Type: mq4 RSIOMA_v2HHLSX.mq4 (6.5 KB, 128 views)

Last edited by fxbs; 08-22-2007 at 05:48 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 08-22-2007, 04:39 AM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
fxbs is on a distinguished road
Buffer(7,MABuffer1); - 4 RSIcalc only - (where RSI of Ma (rsioma) coming from ) we need to get read of it somehow


//+--------------------------------------------------------------------------------+
//| RSIOMAv2HHLSX Kalenzo fxtsd.com |
//| Hornet(i-RSI) 2007, FxTSD.com; MetaQuotes Software Corp. ik|
//| Hist & Levels 20/80;30/70 CrossSig web: Forex Service - Metatrader,Indicators,Experts Advisors,Automated Trading |
//| Rsioma/MaRsioma X sig email: bartlomiej.gorski@gmail.com |
//+--------------------------------------------------------------------------------+
// The base for this indicator was orginal RSI attached with Metatrader.
// ^^ removed ^^ |-< Hornet

#property copyright "Copyright © 2007, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"

#property indicator_separate_window
#property indicator_minimum -20
#property indicator_maximum 120
#property indicator_buffers 7
#property indicator_color1 Blue
#property indicator_color2 Red
#property indicator_color3 Green
#property indicator_color4 Magenta
#property indicator_color5 DodgerBlue
#property indicator_color6 BlueViolet
#property indicator_color7 SlateBlue //RoyalBlue
//#property indicator_color8 MediumSlateBlue
#property indicator_width1 2
#property indicator_width4 2
#property indicator_width5 2
#property indicator_width7 2
#property indicator_level1 100
#property indicator_level2 80
//#property indicator_level3 70
#property indicator_level4 50
//#property indicator_level5 30
#property indicator_level6 20
#property indicator_level7 0
#property indicator_levelcolor SlateGray
//---- input parameters
extern int RSIOMA = 14;
extern int RSIOMA_MODE = MODE_EMA;
extern int RSIOMA_PRICE = PRICE_CLOSE;

extern int Ma_RSIOMA = 21,
Ma_RSIOMA_MODE = MODE_EMA;

extern double BuyTrigger = 80.00;
extern double SellTrigger = 20.00;

extern color BuyTriggerColor = DodgerBlue;
extern color SellTriggerColor = Magenta;

extern double MainTrendLong = 70.00;
extern double MainTrendShort = 30.00;

extern color MainTrendLongColor = Red;
extern color MainTrendShortColor = Green;
extern double MajorTrend = 50;

extern color marsiomaXSigColor = SlateBlue;
//extern color marsiomaXdnSigColor = MediumSlateBlue;

//---- buffers
double RSIBuffer[];
double MABuffer1[];

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

double marsioma[];
double marsiomaXSig[];
//double marsiomaXdnSig[];


string short_name;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
short_name = StringConcatenate("RSIOMA(",RSIOMA,")");
IndicatorBuffers(8);

SetIndexBuffer(0,RSIBuffer);
SetIndexBuffer(2,bup);
SetIndexBuffer(1,bdn);
SetIndexBuffer(3,sdn);//Magnet
SetIndexBuffer(4,sup);//DodgerBlue
SetIndexBuffer(5,marsioma);
SetIndexBuffer(6,marsiomaXSig);
// SetIndexBuffer(7,marsiomaXdnSig);

SetIndexBuffer(7,MABuffer1);

SetIndexStyle(0,DRAW_LINE);
SetIndexStyle(2,DRAW_HISTOGRAM);
SetIndexStyle(1,DRAW_HISTOGRAM);
SetIndexStyle(3,DRAW_HISTOGRAM);
SetIndexStyle(4,DRAW_HISTOGRAM);
SetIndexStyle(5,DRAW_LINE);
SetIndexStyle(6,DRAW_ARROW);
// SetIndexStyle(7,DRAW_ARROW);
SetIndexArrow(6,159);//85,88,251(x),252';108,158,159(dot);161,162(crcl);1 10,167(sq);176-179('scope');11-113,250(hlwSq)
// SetIndexArrow(7,159);
// SetIndexEmptyValue(6,EMPTY_VALUE);
// SetIndexEmptyValue(7,EMPTY_VALUE);
SetIndexLabel(0,"Rsioma");
SetIndexLabel(5,"MaRsioma");
SetIndexLabel(1,"TrendDn");
SetIndexLabel(2,"TrendUp");
SetIndexLabel(6,"Up/DnXsig");

IndicatorShortName(short_name);

SetIndexDrawBegin(0,RSIOMA);
SetIndexDrawBegin(1,RSIOMA);
SetIndexDrawBegin(2,RSIOMA);
SetIndexDrawBegin(3,RSIOMA);
SetIndexDrawBegin(4,RSIOMA);
SetIndexDrawBegin(5,RSIOMA);
SetIndexDrawBegin(6,RSIOMA);
SetIndexDrawBegin(7,RSIOMA);
//----

drawLine(BuyTrigger,"BuyTrigger", BuyTriggerColor);
drawLine(SellTrigger,"SellTrigger", SellTriggerColor );
drawLine(MainTrendLong,"MainTrendLong", MainTrendLongColor );
drawLine(MainTrendShort,"MainTrendShort",MainTrend ShortColor );

return(0);
}
//+------------------------------------------------------------------+
//| Relative Strength Index |
//+------------------------------------------------------------------+
int start()
{
int i, ii;
int counted_bars=IndicatorCounted();
double rel,negative,positive;
//----
if(Bars<=RSIOMA) return(0);
//---- initial zero
if(counted_bars<1)
for(i=1;i<=RSIOMA;i++) {RSIBuffer[Bars-i]=0.0;}
//----
ii=Bars-RSIOMA-1;
if(counted_bars>=RSIOMA) ii=Bars-counted_bars-1;
i = ii;
while(i>=0)
{ MABuffer1[i]=iMA(Symbol(),0,RSIOMA,0,RSIOMA_MODE,RSIOMA_PRICE, i);
i--; }
i=ii;
while(i>=0)
{ RSIBuffer[i]=iRSIOnArray(MABuffer1,0,RSIOMA,i);
if(RSIBuffer[i]>50) bup[i] = 6;
if(RSIBuffer[i]<50) bdn[i] = -6;
if(RSIBuffer[i] > MainTrendLong) bup[i] = 12;
if(RSIBuffer[i] < MainTrendShort) bdn[i] = -12;

if(RSIBuffer[i]<20 && RSIBuffer[i]>RSIBuffer[i+1]) sup[i] = -3;
if(RSIBuffer[i]>80 && RSIBuffer[i]<RSIBuffer[i+1]) sdn[i] = 4;
if(RSIBuffer[i]>20 && RSIBuffer[i+1]<=20) sup[i] = 5;
if(RSIBuffer[i+1]>=80 && RSIBuffer[i]<80) sdn[i] = -5;
if(RSIBuffer[i+1]<=MainTrendShort && RSIBuffer[i]>MainTrendShort) sup[i] = 12;
if(RSIBuffer[i]<MainTrendLong && RSIBuffer[i+1]>=MainTrendLong) sdn[i] = -12;
i--; }
i=ii;
while(i>=0)
{ marsioma[i] = iMAOnArray(RSIBuffer,0,Ma_RSIOMA,0,Ma_RSIOMA_MODE, i);
marsiomaXSig[i] = EMPTY_VALUE;
//marsiomaXdnSig[i] = EMPTY_VALUE;
if(RSIBuffer[i+1]<=marsioma[i+1]&&RSIBuffer[i]>marsioma[i]) marsiomaXSig[i] = -8;
if(RSIBuffer[i+1]>=marsioma[i+1]&&RSIBuffer[i]<marsioma[i]) marsiomaXSig[i] = 8;
i--;}
//----
return(0);
}
//+------------------------------------------------------------------+
void drawLine(double lvl,string name, color Col )
{
ObjectDelete(name);
ObjectCreate(name, OBJ_HLINE, WindowFind(short_name), Time[0], lvl,Time[0], lvl);
ObjectSet(name, OBJPROP_STYLE, STYLE_DOT);
ObjectSet(name, OBJPROP_COLOR, Col);
ObjectSet(name,OBJPROP_WIDTH,1);
}

Last edited by fxbs; 08-22-2007 at 04:54 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 08-22-2007, 11:54 AM
Senior Member
 
Join Date: May 2006
Posts: 156
waltini is on a distinguished road
Extra Buffer Example by CodersGuru

Coders Guru once did an indicator which required more than 8 buffers. I have attached it. Maybe it might help.
Attached Files
File Type: mq4 DECEMA.mq4 (2.6 KB, 79 views)
File Type: mq4 DECEMA-a.mq4 (2.5 KB, 76 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 08-22-2007, 01:12 PM
mladen's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,269
mladen is on a distinguished road
...

Here you go
Attached Files
File Type: mq4 RSIOMA_v2HHLSX__rev.mq4 (6.9 KB, 143 views)

Last edited by mladen; 08-22-2007 at 01:37 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 08-22-2007, 06:00 PM
mladen's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,269
mladen is on a distinguished road
Metatrader bug no.nnn?

Just found out a workaround on Metatrader stuppidity no.???

if anyone uses arrays in code set as series, be sure to unset it as series before resizing if you want to save values stored in the array, in short

if you have anywhere in code something like this
PHP Code:
ArraySetAsSeries(Buffer,true); 
later on the code
PHP Code:
ArrayResize(Buffer,Bars); 
produces wrong array as result, you must use
PHP Code:
ArraySetAsSeries(Buffer,false);
ArrayResize(Buffer,Bars);
ArraySetAsSeries(Buffer,true); 

Last edited by mladen; 08-22-2007 at 09:26 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #6 (permalink)  
Old 08-23-2007, 01:28 AM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
fxbs is on a distinguished road
Thumbs up

Quote:
Originally Posted by waltini View Post
Coders Guru once did an indicator which required more than 8 buffers. I have attached it. Maybe it might help.
Thank you, Waltini! I was looking for example, but when you need it, you can't find it!

Last edited by fxbs; 08-23-2007 at 01:38 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #7 (permalink)  
Old 08-23-2007, 01:38 AM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
fxbs is on a distinguished road
Thumbs up

thanks Mladen!

You guys good - can crack any of their dem code with restrictions ....
unbelievable - 2 hack mt4 jus' like that ...

Last edited by fxbs; 08-23-2007 at 05:00 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #8 (permalink)  
Old 08-23-2007, 02:29 AM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
fxbs is on a distinguished road
and seriously, thank you, guys - Rsioma - Kalenzo's and our Forum's baby

thanks a lot



Below: Mladen's comments on code change:
Quote:
Originally Posted by mladen
buffer+
PHP Code:
double marsioma[];
double marsiomaXSig[];
//
//
// add this one
datetime lastBarTime;
//double marsiomaXdnSig[];

PHP Code:
ArraySetAsSeries(MABuffer1,true);
// SetIndexBuffer(7,MABuffer1);

PHP Code:
int start()
{
int i, ii;
int counted_bars=IndicatorCounted();
double rel,negative,positive;
//-------
if (lastBarTime != Time[0]) {
lastBarTime = Time[0];
ArrayResize(MABuffer1,Bars);
}

//-------
if(Bars<=RSIOMA) return(0);
__________________________________________________ ____
and add these line in init
------------------------------------------
PHP Code:
ArraySetAsSeries(MABuffer1,true);
//
// these lines
// need to empty the buffer when changing
// time frames or accounts
//
ArrayResize(MABuffer1,Bars);
ArrayInitialize(MABuffer1,EMPTY_VALUE);
// SetIndexBuffer(7,MABuffer1);

Last edited by fxbs; 08-23-2007 at 05:23 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #9 (permalink)  
Old 08-23-2007, 02:48 AM
Senior Member
 
Join Date: Aug 2006
Posts: 456
RickW00716 is on a distinguished road
Quote:
Originally Posted by mladen View Post
Here you go
How is this indicator interpreted/used?

What are the blue dots,blue lines and magenta lines for?

Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #10 (permalink)  
Old 08-23-2007, 04:43 AM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
fxbs is on a distinguished road
Quote:
Originally Posted by RickW00716 View Post
How is this indicator interpreted/used?
post1 - link to RSI of MA thread; all explenations are there

Last edited by fxbs; 08-23-2007 at 05:12 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
RSIOMA, RSIOMA INDICATOR, fxtsd


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unauthorized Extra Charges on may credit statement Navid General Discussion 10 05-11-2007 05:12 PM
MT4 with extra weekend bar woteva Metatrader 4 3 04-30-2007 04:13 AM
Help with buffer limits and flatlining indicator lines iboersma Indicators - Metatrader 4 0 03-22-2007 08:27 PM


All times are GMT. The time now is 09:45 PM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.