| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Sure. Mladen is doing well.
__________________
You need proffesional mql coder? Contact me! I will help you! ........................................ http://www.fxservice.eu/ ........................................ |
|
|||
|
Yepp - BarCount, buff. EmptyVal - all here
Thank You, Mladen! Let me jus put Signal in our pretty buffer and our beloved Rsioma got brand new v3 - Voala! ![]() [i'll post it here & Rsioma thread later today] Thanks again, Mladen! P/S. & pretty informative thread (HowTo - opening PandoraBox), don't u think? Last edited by fxbs; 08-23-2007 at 09:28 AM. |
|
|||
|
OK, 11 temp. versions later, final cut:
____________________ extern int RSIOMA = 14; extern int RSIOMA_MODE = MODE_EMA; extern int RSIOMA_PRICE = PRICE_CLOSE; extern int Ma_RSIOMA = 21; extern int Ma_RSIOMA_MODE = MODE_EMA; extern int BarsToCount = 500; //---- buffers // "fake indexes" double MABuffer1[]; double RSIBuffer1[]; // indexes double RSIBuffer[]; double marsioma[]; int correction; datetime lastBarTime; string short_name; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { short_name = StringConcatenate("RSIOMA[",RSIOMA,"](",Ma_RSIOMA,")"); IndicatorShortName(short_name); SetIndexBuffer(0,RSIBuffer); SetIndexBuffer(1,marsioma); // additional buffer(s) correction = RSIOMA+RSIOMA+Ma_RSIOMA; BarsToCount = MathMin(Bars,MathMax(BarsToCount,300)); ArrayResize( MABuffer1 ,BarsToCount+correction); ArrayResize( RSIBuffer1,BarsToCount+correction); ArraySetAsSeries(MABuffer1 ,true); ArraySetAsSeries(RSIBuffer1,true); lastBarTime = EMPTY_VALUE; return(0); } //+------------------------------------------------------------------+ int start() { static bool init=false; int counted_bars=IndicatorCounted(); int limit,i=0; if(counted_bars<0) return(-1); if(lastBarTime != Time[0]) { lastBarTime = Time[0]; counted_bars = 0; } if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; limit=MathMin(limit,BarsToCount+correction); for(i=limit;i>=0;i--) MABuffer1[i] = iMA(Symbol(),0,RSIOMA,0,RSIOMA_MODE,RSIOMA_PRICE,i ); for(i=limit;i>=0;i--) RSIBuffer1[i] = iRSIOnArray(MABuffer1,0,RSIOMA,i); for(i=limit;i>=0;i--) { RSIBuffer[i]= RSIBuffer1[i]; marsioma[i] = iMAOnArray(RSIBuffer1,0,Ma_RSIOMA,0,Ma_RSIOMA_MODE ,i); } for (i=0;i<indicator_buffers;i++) SetIndexDrawBegin(i,Bars-BarsToCount); return(0); } //The End +------------------------------------------------------------------+ Last edited by fxbs; 09-01-2007 at 03:30 AM. |
|
|||
|
Extra buffers (need more thsan 8)?
Some article Multiple Null Bar Re-Count in Some Indicators - MQL4 Articles and Igorad's indicator http://www.forex-tsd.com/70061-post23.html Or read whole thread DECEMA - Xmas gift! Just for information. |
|
|||
|
thank you, ND
good info and links + - how to add extra buffer (Omelette, Kalenzo) examples - it's not always necessary add extra buffers - IgorAd's Decema version Last edited by fxbs; 03-19-2008 at 11:55 AM. |
|
||||
|
...
Actually we, meaning the users of MetaTrader, do need extra buffers for drawing
For calculation there is no limitation whatsoever Just for the fun of it I post an indicator that is calculating multiple mas (meaning ma of an ma of an ma...) to the level you like it and does it by using buffers - 8 buffers for every 7 levels (first picture), so, with default parameters it uses 28 buffers Drawing is another thing If we do not want to use objects to draw values, we are limited to just 8 buffers Thing like the second "indicator" I post are absolutely impossible in MetaTrader if one wants to use just buffers (second picture) Just for emas on that chart you would need 27 buffers (RSI on the bottom theoretically achieves 100 shades of red and 100 shades of green, making it draw would need thus at least 200 buffers more) and all that is simply not possible in MetaTrader What we need is, in my opinion, and I stated it a couple of times, a plot routine that would change the logic of using buffers for drawing (it is really not difficult to imagine how one could retrieve past values) The number of buffers we can circumvent one way or another, but drawing the way we are forced to do it, is becoming a pain in the ass PS : none of the indicators posted here is ment to be used in trading They are posted here only as a demonstration of the things I said in the post Last edited by mladen; 07-21-2008 at 05:02 PM. |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unauthorized Extra Charges on may credit statement | Navid | General Discussion | 10 | 05-11-2007 04:12 PM |
| MT4 with extra weekend bar | woteva | Metatrader 4 | 3 | 04-30-2007 03:13 AM |
| Help with buffer limits and flatlining indicator lines | iboersma | Indicators - Metatrader 4 | 0 | 03-22-2007 06:27 PM |