Coding help - page 356

 

Hi Mladen (or Mrtools)

I think you remember we had a discussion about adding an alert to the SSA MA when the SSA would cross with its MA.

You said the SSA recalculates or 'repaints' (I hate that word ...). Of course you are right, but I still do not agree on the M1, because in my experience it's not a big deal over there. Enfin, soit ...

I don't need that alert anymore, because the crossing happens mostly very early, it's easy to see ...

But, what I really would like, is an alert when the SSA crosses the -0.3 level from UNDERNEATH only.

And also an alert when the SSA crosses the 0.3 line from ABOVE only.

Just look at the arrows I have put there my self on the chart in the SSA subwindow.

Of course adding the extra levels (-0.3 and 0.3) would be great.

Thank you your greatness !!!

Files:
ssam1.png  41 kb
ssa__ma.mq4  5 kb
 
alpha24:
Hi Mladen and Mrtools,

Will you please make this indicator visualize exact reverse than chart window?

Here is attaching image (created in another trading SW). it is difficult for me to explain you coz of language problem so please kindly help me.

Files:
screenshot.png  26 kb
 
alpha24:
Here is attaching image (created in another trading SW). it is difficult for me to explain you coz of language problem so please kindly help me.

alpha24

The only way to invert the values that way is to make the value equal to 0-value (negative instead of positive)

 
mladen:
alpha24 The only way to invert the values that way is to make the value equal to 0-value (negative instead of positive)

Sir,

I am Zero in coding so if you have time please code it.

 
alpha24:
Sir, I am Zero in coding so if you have time please code it.

What I am trying to tell is that you can not mirror the prices without completely changing the values (they can not stay positive). Attaching some indicator with values less than 0 to the main chart is impossible since metatrader will not display them

Prices do not have a natural axis except 0 and that is why they can not be mirrored to time series price charts

 

I am sorry But I never want it in main chart and this someone already made in separate window but he is not posting here.see this image.

Files:
snap154.jpg  107 kb
 

alpha24

You can take the one from this post https://www.mql5.com/en/forum/178416/page22and then replace these lines

if (MAperiod1 > 0) ExtMapBuffer1[k] = iMA(forSymbol,periods[p],MAperiod1,0,MAMethod,AppliedPrice,i);

if (MAperiod2 > 0) ExtMapBuffer2[k] = iMA(forSymbol,periods[p],MAperiod2,0,MAMethod,AppliedPrice,i);[/PHP]

with these

if (MAperiod1 > 0) ExtMapBuffer1[k] = -iMA(forSymbol,periods[p],MAperiod1,0,MAMethod,AppliedPrice,i);

if (MAperiod2 > 0) ExtMapBuffer2[k] = -iMA(forSymbol,periods[p],MAperiod2,0,MAMethod,AppliedPrice,i);[/PHP]

and these lines

[PHP] double high = iHigh (forSymbol,period,shift);

double low = iLow (forSymbol,period,shift);

double open = iOpen (forSymbol,period,shift);

double close = iClose(forSymbol,period,shift);

with these

[PHP] double high = -iHigh (forSymbol,period,shift);

double low = -iLow (forSymbol,period,shift);

double open = -iOpen (forSymbol,period,shift);

double close = -iClose(forSymbol,period,shift);

___________________________

PS: it is obvious why he is not posting here, when he used the "all ma" for what he is showing on the pictures with the upper changes in the code

 

Thank you sir

So nice of you. Totally speechless. Hats off.

God send people like you from heaven.

 

Hi Mastercash,

Good to hear it's working...

To satisfy our curiosity...what did you do to get it to work...?

Regarding "immediately take another SELL on EURUSD regardless whether the signal is still valid or not"...

From what I see...so many indicators in your Buy/Sell conditions makes it confusing to separate what's happening.

For further testing...I suggest you simplify the conditions to just one indicator -

Example - just use your EMA 5 and EMA 13 crossings... If this works...then add your other conditions...

With that said...there does seem something wrong with the Buy/Sell routines in this EA template...among other things...

I did try the simple EMA crosses and it does trade continuously the same order type...even if the opposite condition becomes true.

What you might try is...search for Mladen's EA's and use them as your new EA template... You should have less problems and better results that with this EA...

Just insert your user settings and your Buy/Sell conditions in the new EA template and try again...

That's the best I can suggest without someone re-writing the EA from scratch...

Hope this helps,

Robert

* Note - by "Mladen's EA's"...I mean those that are available in the free public section. Hopefully this recommendation is taken as a compliment to a great coder.

 
alpha24:
Thank you sir

So nice of you. Totally speechless. Hats off.

God send people like you from heaven.

How are you using inverted prices?

Reason: