Coding help - page 677

 
mladen:

That indicator is using buffers only as a sort of distraction. It creates a "fibo" object and then in the object, levels must be treated differently. Use the attached

Perfect! Exactly what I was looking for.

Thank you so much mladen.

 
speedytina:

Perfect! Exactly what I was looking for.

Thank you so much mladen.

Hi mladen;

I know that I'm pushing my luck, but is it also possible to accomplish what I have illustrated in the   following link?

https://www.mql5.com/en/charts/5791242/audjpy-d1-eightcap-pty-ltd

Just trying to keep charts as uncluttered as possible. If you don't have the time then don't worry about it.

Again thanks

Files:
Fibos.mq4  6 kb
 

Dear mladen,

I'm trying to get the values from the attached indi but I receive the correct value only for the firs bar, after that I get the  2147483647 value !!!

Strange behaviour. I use the following piece of code:


// ----------   Calcolo SIGMA
   Sigma=iCustom(NULL,0,"Sigma",1,1); 
 

Thanks,


Andrea

Files:
Sigma.mq4  4 kb
 
andreatrade:

Dear mladen,

I'm trying to get the values from the attached indi but I receive the correct value only for the firs bar, after that I get the  2147483647 value !!!

Strange behaviour. I use the following piece of code:


// ----------   Calcolo SIGMA
   Sigma=iCustom(NULL,0,"Sigma",1,1); 
 

Thanks,


Andrea

All is OK with that, except you should use buffer No 2. Like this :

Sigma=iCustom(NULL,0,"Sigma",2,1);  
 
andreatrade:

Dear mladen,

I'm trying to get the values from the attached indi but I receive the correct value only for the firs bar, after that I get the  2147483647 value !!!

Strange behaviour. I use the following piece of code:


// ----------   Calcolo SIGMA
   Sigma=iCustom(NULL,0,"Sigma",1,1); 
 

Thanks,


Andrea

Correction :

Change lines 74 and 75 of sigma from this :

   Media[i+1]=0;
   ScartoMedio[i+1]=0;

to this :

   Media[MathMin(i+1,Bars-1)]=0;
   ScartoMedio[MathMin(i+1,Bars-1)]=0;

And it should work

Or remove the strict statement completely (since that indicator needs a complete rewrite if it is going to be used with the "strict")

 

hello,

could someone add please an option to show a result of closed trade also in account currency and % of the account? for example - 5 pips, 2$ and 0.5% of account profit would look like this:

+5.0 / +2.00$ / +0.5%

 

thanks in advance ;) 

Files:
 
mladen:

PS: to shift the values now you have to use + values to shift the arrows to the right and - values to shift the values to the left (attaching the test code and it works OK for any case of shifting the arrows - left or right)

thanks and sorry for my delayed reply, i'll check and i'll let you know. many thanks again Mladen
 
mladen:

Correction :

Change lines 74 and 75 of sigma from this :

to this :

And it should work

Or remove the strict statement completely (since that indicator needs a complete rewrite if it is going to be used with the "strict")


Dear mladen,

I tried both solutions without success. The behaviour is the same: when starting the EA I receive the correct value of the indi but after one bar  I get the  2147483647 value.


Andrea



 
simon_json:

Thanks for reply!
I want to buy when both indicators indicate (say both are green). If one turns red (sell) EA should exit buy. If the same indicator turns green again (so both are green) EA should buy again. And the same for sell-orders;

I want to sell when both indicators indicate (say both are red). If one turns green (buy) EA should exit sell. If the same indicator turns red again (so both are green) EA should sell again.

So they are kind of filter each other out.  

Hi mladen,
Could you please help me with this. I have tried some combinations and different things, but can't figure out how to do this. Thanks! 

 
simon_json:

Hi mladen,
Could you please help me with this. I have tried some combinations and different things, but can't figure out how to do this. Thanks! 

Simon

The conditions should be more refined. For example : when both are signaling the same is very often. So, when exactly should they do that. On the first occurrence of that? On every occurrence of that? Also, if you are exiting on ever change of one of the two, the exits are going to be very frequent

Reason: