PDA

View Full Version : How to make indior output 0 as the value instead of blank



isamel98
04:56,
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/attachments/1527223304973359681.mq4
https://www.forexsoutheast.asia/attachments/1527223293.jpg

isamel98
19:57,
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/attachments/1527223294.jpg
https://www.forexsoutheast.asia/attachments/1527223306839827737.jpg
https://www.forexsoutheast.asia/attachments/15272233081137381884.mq4

sulaynssipk
21:18,
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




,
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

isamel98
22:39,
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.
-
https://www.forexsoutheast.asia/attachments/15272233101164328620.jpg
https://www.forexsoutheast.asia/attachments/1527223297.png
https://www.forexsoutheast.asia/attachments/1527223298.png

sulaynssipk
23:59,
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.

sulaynssipk
01:20,
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.