How to make indior output 0 as the value instead of blank
Results 1 to 6 of 36

Thread: How to make indior output 0 as the value instead of blank

  1. #1
    I discovered the connected indior. I need to modify it so that the sparks are instead of nothing (as seen in attached screenshot).

    How can I change it so it outputs a 0 when no PinBar is noticed, and then when one is discovered, it will place an arrow and output will have a value? Thank you for your help.
    https://www.forexsoutheast.asia/atta...4973359681.mq4

  2. #2
    Quote Originally Posted by ;
    You may use the purpose http://docs.mql4.com/customind/SetIndexEmptyValue in the init() work to accomplish that.
    Xaphod,
    Thank you for your answer.

    I included SetIndexEmptyValue(0,0.0); for each one of the buffers, however as could see in the pic, it still does not have an empty value of 0, just blank. What did I do wrong?


    -


    https://www.forexsoutheast.asia/atta...1137381884.mq4

  3. #3
    The guide states:
    Empty values are not attracted or shown in the DataWindow.

    So that you'll have to eliminate SetIndexEmptyValue or set it to (EMPTY_VALUE) and explicitly set each index value to 0.
    Search for buyPB and set it to 0 in the start of the while loop.
    While (posgt;0)
    buyPB[pos]=0;
    ...
    ...
    etc



    Quote Originally Posted by ;
    ,
    Thanks for your answer.

    I included SetIndexEmptyValue(0,0.0); for all of those buffers, however as can see in the pic, it still does not have a empty value of 0, just blank. What exactly did I do wrong?


    -Stearno

  4. #4
    Quote Originally Posted by ;
    The guide says:
    Empty values aren't drawn or shown from the DataWindow.

    So that you will need to remove SetIndexEmptyValue or set it to (EMPTY_VALUE) and explicitly set each index value to 0.
    Search for buyPB and set it to 0 at the beginning of the while loop.
    While (posgt;0)
    buyPB[pos]=0;
    ...
    ...
    etc
    I thought that SetIndexEmptyVlaue (1,0.0) would set the value at 0.0 when it was empty. Okay, my mistake. I did as you said it works now. Thank you very much foryour help and teaching me this.
    -



  5. #5
    Quote Originally Posted by ;
    I found the connected indior. I want to modify it to ensure the outputs are instead of nothing (as seen in attached screenshot).

    How do I change it so that it outputs a 0 if no PinBar is detected, then when one is detected, it is going to place an arrow and that output is going to have a value? Thank you for your help.
    It is possible to use the function http://docs.mql4.com/customind/SetIndexEmptyValue in the init() function to achieve that.

  6. #6
    Quote Originally Posted by ;
    I thought that SetIndexEmptyVlaue (1,0.0) would set the value in 0.0 as it was empty. Okay, my mistake. I did as you mentioned it works today. Thank you very much foryour assistance and teaching me .
    -Stearno
    So did I. However, the manual stated differently. Glad you got it working as you want.

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.