Requests & Ideas - page 646

 
jerfin:

Please, help !

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)

 
mladen:

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 :(
 
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

 
I tried to explain in pictures.
Files:
 
jerfin:
I tried to explain in pictures.
Yes, then all is OK
 
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 !
 
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 !
Please read this post : https://www.mql5.com/en/forum/178018/page97
 
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  
 

mladen,

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
 
94315jim:

mladen,

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  

It can be made like that , but it will not look exactly like that

Which exact indicator are you using now?

Reason: