Reply

Help please, How to Handle “NULL” value should be simple? EA Wizard

5 replies

realizenow

Subscriber, bbp_participant, community, 2 replies.

Visit profile

6 years ago #195612

In the past I have changed indicators when running into this NULL as it was quicker for me to do so than post on forum, but this time I have an indicator I do not have MQ4 file, just exe so I cannot change it and have to deal with its output in EA Wizard. There are a number of indicators I would like to use with a similar issue as below so there should be a simple solution. I imagine I just cannot find the NULL/EMPTY in EA Wizard as it should be there.

Indicator has two buffers.

Output1=Long
Output2=Short

Long Condition #1
Output1=100
Output2=NULL/EMPTY

Short Condition #1
Output1=NULL/EMPTY
Output2=100

Short Condition #2
Output1=100
Output2=100

Short Condition #2 is the one that makes it difficult.

I cannot simply program
if OutPut1 is100 then long
or
If OutPut2 is 100 then Short
because of Short Condition #2 where both buffers contain the same value at the same time if I just did the above when Short Condition #2 it would flip long/short, understand?

I should be able to program something like this buffer1[0]==100 && buffer2[0]==NULL then long
in MQ4 you can use NULL or EMPTY to condition where is it in EA Wizard how do I accomplish the same thing? I have needed this in the past a number of times for other indicators with similar issues.

How exactly do I do this in EA Wizard…remember I cannot rewrite the indicator so I have to do this in EA Wizard.
This is what I need to do to address Short Condition #2 I have to put in the 3 below in EA Wizard.

Long Condition#1
Output1=100 & Output2 = NULL then LONG

Short Condition #1
Output1=NULL & Output2=100

Short Condition #2
Output1=100 & Outpout2=100

Where exactly do I go in EA wizard to hand a NULL/EMPTY value to program the 3 conditions above as outlined? If there is no access to NULL/EMPTY (not sure why) to perform the above, is there any other way to write these 3 conditions so they will execute properly in EA Wizard? This should be super simple so I think I am overlooking something when I have encountered this problem. Help is appreciated. Thank you.

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #196080

Hello,

the current version cannot work with NULL value as you describe it. We could add this into Wizard 4 so you will be able to add such conditions when custom indicators are used. I will add this to requests for the new version

0

realizenow

Subscriber, bbp_participant, community, 2 replies.

Visit profile

6 years ago #196901

Tomas262 thanks for the reply.

Since the current EA wizard cannot work with NULL values. Is there any workarounds anybody can think of? There has to be a way to get this done as NULL value is a identifiable value.

For example if we know Output1=NULL then perhaps we can work around it in existing EA in two ways.

#1 could I set something like this in EA IF Output1=99996666 (specific # to use search in mt4 editor) then search that number and replace with NULL instead of number would that work?

#2 perhaps there is a way to us EA wizard as it is now but I am not sure how I would program it if somebody could give specific example using interface that would be great. Here is what I am thinking. A NULL is Empty. So Output1 is NOT greater than 0, is not be less than 0 and is not equal to 0. Would that work and how would I put that into existing EA wizard?

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #196930

Hello,

there might be an option. You would have to add this function into Wizard / code / CustomFunction.mq4 file

void nullFunction() {
   return NULL;
}

Then you could be able to use comparison like this

If “SomeIndicatorValue” = CustomFunction(nullFunction()) then …

It is an idea I have not tested this yet but could do tomorrow. You can provide an indicator that outputs NULL value so I won’t have to search for some 🙂

0

realizenow

Subscriber, bbp_participant, community, 2 replies.

Visit profile

6 years ago #197979

tomas262,

I am sorry I never received notice you responded.  At this point I think I will wait for the program to give the option for NULL.  I change the code to much to tweak inside of SQ EA Wiz, probably a big hassle to keep going in and changing.  thank you.

 

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #197986

Ok, we will consider adding this to EA Wizard 4.

0

Viewing 5 replies - 1 through 5 (of 5 total)