Help with indior please
Results 1 to 8 of 8

Thread: Help with indior please

  1. #1
    Hello Men,

    I'm playing the iMAOnArray function but am unable to find the following indior to have an outcome. The indior window I drag this into remains blank.

    Any help appreciated.

    Regards
    Steve

    // ------------------------------------------------------------------
    //| iMAOnArray.mq4 |
    //| Coders Guru |
    //| http://www.metatrader.info |
    // ------------------------------------------------------------------

    #property copyright Coders Guru
    #property link http://www.metatrader.info


    #property indior_separate_window
    #property indior_color1 LawnGreen
    #property indior_color2 DarkBlue

    double ExtMapBuffer1[];
    double RSI_Val[];
    double RSI_Val_SMA[];

    int init()

    IndiorDigits(MarketInfo(Symbol(),MODE_DIGITS));
    SetIndexStyle(0,DRAW_LINE);
    SetIndexBuffer(0,ExtMapBuffer1);

    return(0);


    int deinit()

    return(0);


    int begin()

    int pub, limit;

    int counted_bars=IndiorCounted();
    if(counted_barslt;0) return(-1);
    if(counted_barsgt;0) counted_bars--;
    limit=Bars-IndiorCounted();


    for(bar=0; barlt;limitation; pub )
    RSI_Val[pub] = iCustom(NULL, 0, RSI,0,0,pub);

    for(bar=0; barlt;limitation; pub )
    RSI_Val_SMA[pub]=iMAOnArray(RSI_Val,Bars,5,0,MODE_SMA,pub);

    for(bar=0; barlt;limitation; pub )
    if(RSI_Val[pub]gt;RSI_Val_SMA[pub])
    ExtMapBuffer1[pub] = 1;
    else
    ExtMapBuffer1[pub] = 0;


    return(0);

  2. #2
    Quote Originally Posted by ;
    Hello ,

    Thanks for the email. I don't want to seem dumb but what exactly do I need to install. It changed to what I have below but there is still no output.

    Essentially I want it to show a line using a value of either a 1 or a.. .
    Place this
    Inserted Code SetArrayAsSeries(RSI_Val_SMA, true); SetArrayAsSeries(RSI_Val, true); maybe the functions are spelt wrong or parameters count isn't right. I don't have the reference. But it.
    DO REMEMBER to test that the returned value, because it is not the same value as displayed both in the navigator window along with the chart.

    I don't remember having sent you any e-mail btw.

  3. #3
    I guess I've figured out the problem you need to place the array size,
    Inserted Code double ExtMapBuffer1#91;#93;; double RSI_Val#91;#91;colour=DarkOrange#93;put a number here#91;/colour#93;#93;; double RSI_Val_SMA#91;#

  4. #4
    int init()

    IndiorBuffers(3);
    SetIndexStyle(0,DRAW_LINE);
    SetIndexBuffer(0,ExtMapBuffer1);
    SetIndexBuffer(1,RSI_Val);
    SetIndexBuffer(2,RSI_Val_SMA);
    return;

  5. #5
    Quote Originally Posted by ;
    int init()

    IndiorBuffers(3);
    SetIndexStyle(0,DRAW_LINE);
    SetIndexBuffer(0,ExtMapBuffer1);
    SetIndexBuffer(1,RSI_Val);
    SetIndexBuffer(2,RSI_Val_SMA);
    return;
    rsival and rsivalsma should not be attracted, is is essential to place buffer for them in order to be employed by imaonarray?

  6. #6
    Hi lmyyyks,

    Thank You to This email. I don't want to sound stupid but what else do I need to install. It changed to what I have below but there is still no output.

    Essentially I would like it to display a line with a value of either a 1 or a 0 depending on the condition.

    In the event that you got it to dispaly something would you include the code to the response.

    Regards
    Steve

    //p------------------------------------------------------------------
    //| iMAOnArray.mq4 |
    //| Coders Guru |
    //| http://www.metatrader.info/ |
    //p------------------------------------------------------------------

    #property copyright Coders Guru
    #property Hyperlink http://www.metatrader.info


    #property indior_separate_window
    #property indior_color1 LawnGreen
    #property indior_color2 DarkBlue

    double ExtMapBuffer1[];
    double RSI_Val[5000];
    double RSI_Val_SMA[5000];

    int init()

    IndiorDigits(MarketInfo(Symbol() ,MODE_DIGITS));
    SetIndexStyle(0,DRAW_LINE);
    SetIndexBuffer(0,ExtMapBuffer1);

    return(0);


    int deinit()

    return(0);


    int start()

    int bar, limit;

    int counted_bars=IndiorCounted();
    if(counted_barslt;0) return(-1);
    if(counted_barsgt;0) counted_bars--;
    limit=Bars-IndiorCounted();


    for(bar=0; barlt;limitation; bar )
    RSI_Val[bar] = iCustom(NULL, 0, RSI,0,0,bar);

    for(bar=0; barlt;limitation; bar )
    RSI_Val_SMA[bar]=iMAOnArray(RSI_Val,Bars,5,0,MODE_S MA,bar);

    for(bar=0; barlt;limitation; bar )
    if(RSI_Val[bar]gt;RSI_Val_SMA[bar])
    ExtMapBuffer1[bar] = 1;
    else
    ExtMapBuffer1[bar] = 0;


    return(0);









    Quote Originally Posted by ;
    I figure I've figured out the problem you have to set the selection size,
    Inserted Code double ExtMapBuffer1#91;#93;; double RSI_Val#91;#91;colour=DarkOrange#93;put a number here#91;/colour#93;#93;; double RSI_Val_SMA#91;#91;colour=DarkOrange#93;put a number here#91;/colour#93;#93;; but then another problem appears.
    The calculated figure doesn't fit the calculated figure displayed in the chart....

  7. #7
    Thank You for that.

    I will give it a go.

    Sorry, when I said email I meant the article you put up.



    Quote Originally Posted by ;
    put this
    Inserted Code SetArrayAsSeries(RSI_Val_SMA, true); SetArrayAsSeries(RSI_Val, true); maybe the most purposes are spelt wrong or parameters depend isn't right. I really don't have the reference right now. But it.
    DO REMEMBER to test that the returned value, because it's not the exact same value as exhibited both in the navigator window and the chart.

    I do not recall having sent you some e-mail btw.

  8. #8
    Hi Guys,

    This is fantastic, thanks for all of your help.

    Regards
    Steve

    Quote Originally Posted by ;
    no, it is not. But it will create arrays easy to use without have to worry about array initialization.

    The main cause of the problem is this line:
    RSI_Val[pub] = iCustom(NULL, 0, RSI,0 ,0,pub);
    using 0 signifies RSI Phase = 0. It is far better to use parameter.
    Or utilize the iRSI() work

    [/php]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners more information