# Requests & Ideas - page 646

163290

jerfin:

entry position if both indicators same direction.

exit if one shows a different direction.

indicator1=SI

indicator2=HI

is this code right ??

-------------------------

void Entry()

{

Buy = (SI(0,sh) != 0 && HI(1,sh) !=EMPTY_VALUE && HI(1,sh+1) == EMPTY_VALUE);

Sell= (SI(1,sh) != 0 && HI(2,sh) !=EMPTY_VALUE && HI(2,sh+1) == EMPTY_VALUE);

ExBuy = (SI(0,sh) != 0 && HI(2,sh) !=EMPTY_VALUE && HI(2,sh+1) == EMPTY_VALUE);

ExSell= (SI(1,sh) != 0 && HI(1,sh) !=EMPTY_VALUE && HI(1,sh+1) == EMPTY_VALUE);

That is a partial code that does not help

Check your Sl() and Hl() functions and what are they returning (EMPTY_VALUE is not == 0, so the condition to check if it is not ==0 will return true even when the return from the function is EMPTY_VALUE)

7

That is a partial code that does not help

Check your Sl() and Hl() functions and what are they returning (EMPTY_VALUE is not == 0, so the condition to check if it is not ==0 will return true even when the return from the function is EMPTY_VALUE)

Sorry. I did not understand :(
163290

jerfin:
Sorry. I did not understand :(

When you use metatrader 4, EMPTY_VALUE is equal to 2147483647

So when you are testing a condition like "!=0" it will be true even when the return from the function is EMPTY_VALUE

In any case, without knowing what exactly functions Sl() and Hl() do, I can only do wild, wild guesses and nothing else

7

I tried to explain in pictures.
Files:
163290

jerfin:
I tried to explain in pictures.
Yes, then all is OK
168

Hi guys i'm using the Adaptive Macd  mtf-alerts-arrows 2 indicator, my problem is that when i try to apply a sma to that indicator, the sma stay only above zero instead doing the full cycle (like in the pic). I post also mq4 of the indicator in the photo. Do you know what is the problem ? Can you solve it? Thank you very much !
Files:
163290

danizani95:
Hi guys i'm using the Adaptive Macd  mtf-alerts-arrows 2 indicator, my problem is that when i try to apply a sma to that indicator, the sma stay only above zero instead doing the full cycle (like in the pic). I post also mq4 of the indicator in the photo. Do you know what is the problem ? Can you solve it? Thank you very much !
19

mntiwana:

I don't know why it do not work may be moderators can help you . any way some cycle identifiers are repainting ones.

regards

Yep! but, it depends how to use recalculate indicators. Sometimes repaint is beautiful.
Best regards
Joakim
723

Is it possible to code Hibert Sinewave (with support/resistance lines) so that when the market is in Trend mode then the background color shows changes to something similar to that of the picture attached?

thanks,

jim

Files:
sinewave2.jpg 105 kb
163290

94315jim: