EA trading in the opposite direction - page 3

 
YouTrade:

Hi !

Can someone please help me on this ? (figurelli it just happened ... is this what you were explaining?)

Picture 1 shows my EA MA configuration.

Fast MA is 3 Smoothed and Slow MA is 4 Exponential.

Probably because of the TYPE, Slow MA (4) crossed from bottom to top starting a SELL position (picture MMA2) instead of BUY position. As you see, the MA4 is below MA3.

How can I avoid this? Does it have any kind of specification about MA with closer values and its type?

Regards,

Marcelo

We can't see anything on your chart :

  1. Please use different colors for each MA.
  2. What you see on the chart is irrelevant if your are detecting a cross on open bar.
 
angevoyageur:

We can't see anything on your chart :

  1. Please use different colors for each MA.
  2. What you see on the chart is irrelevant if your are detecting a cross on open bar.
3 is red, 4 is yellow
Files:
MMA2.png  92 kb
 
YouTrade:
3 is red, 4 is yellow

Thank you. Yes it's a case as Figurelli said. A fast/slow MA is not only determined by the period, but also by the smoothing method.

It's an interesting coding challenge

 
angevoyageur:

Thank you. Yes it's a case as Figurelli said. A fast/slow MA is not only determined by the period, but also by the smoothing method.

It's an interesting coding challenge

Coding on progress ...
 
YouTrade:
Coding on progress ...
angevoyageur:

Thank you. Yes it's a case as Figurelli said. A fast/slow MA is not only determined by the period, but also by the smoothing method.

It's an interesting coding challenge

Sorry Ange ... no Clue (Pict atached).
Files:
Capturar.PNG  24 kb
 

Did not like the solution that much ...

When OnTick() Starts, @ the begining of the market I get the values of the variables.

If iMA_buf_fast[0]>iMA_buf_slow[0] then the values are inverted.

I am going to need some help. Did not like the solution at all.

   if(ticks==1)
     {
      if(iMA_buf_fast[0]>iMA_buf_slow[0]))
        {
         err1=CopyBuffer(iMA_fast_handle,0,0,5,iMA_buf_slow);
         err2=CopyBuffer(iMA_slow_handle,0,0,5,iMA_buf_fast);

        }
      else
        {
         err1=CopyBuffer(iMA_fast_handle,0,0,5,iMA_buf_fast);
         err2=CopyBuffer(iMA_slow_handle,0,0,5,iMA_buf_slow);

        }
     }
 
YouTrade:

Did not like the solution that much ...

When OnTick() Starts, @ the begining of the market I get the values of the variables.

If iMA_buf_fast[0]>iMA_buf_slow[0] then the values are inverted.

I am going to need some help. Did not like the solution at all.

Reason: