Experts: GalacticExplosion

 

GalacticExplosion:

Buy or Sell signals are generated when the price is above iMA (Miving Average, MA) with a very large period. As the number of open positions increases, the distance between trades (during which entry signals are skipped) also increases. The EA trades in the specified time interval.

Author: Vladimir Karputov

 

Does this chunk of code mean that we should trade on H1?

      double MA=iMAGet(0);
      if(MA==0.0) // copying fails 
         return;
      if(!RefreshRates())
        {
         PrevBars=iTime(m_symbol.Name(),Period(),1);
         return;
        }
      if(m_symbol.Ask()<MA)
         need_open_buy=true;
      else if(m_symbol.Bid()>MA)
         need_open_sell=true;
 
moneyfoundbymichael:

Does this chunk of code mean that we should trade on H1?

When you post code please use the SRC button !

 
moneyfoundbymichael :

Does this chunk of code mean that we should trade on H1?

      double MA=iMAGet(0);
      if(MA==0.0) // copying fails 
         return;
      if(!RefreshRates())
        {
         PrevBars=iTime(m_symbol.Name(),Period(),1);
         return;
        }
      if(m_symbol.Ask()<MA)
         need_open_buy=true;
      else if(m_symbol.Bid()>MA)
         need_open_sell=true;


No. In this piece of code, there is nowhere to mention the timeframe PERIOD_H1.

 
These EA's are published many times with incomplete code or code that does not work. The explanations of the EA and how it works is sparse to say the least. 

In GalacticExplosion here is a chunk of code concerning entry above and below the MA. 

 

 double MA=iMAGet(0);
 if(MA==0.0) // copying fails
  return;
 if(!RefreshRates())
 {
  PrevBars=iTime(m_symbol.Name(),Period(),1);
  return;
 }
 if(m_symbol.Ask()<MA)
  need_open_buy=true;
 else if(m_symbol.Bid()>MA)
  need_open_sell=true;
 

You will notice that it buys under the MA and sells over the MA. 

However in the presentation of this EA it states the opposite. 
 
moneyfoundbymichael:
These EA's are published many times with incomplete code or code that does not work. The explanations of the EA and how it works is sparse to say the least. 

In GalacticExplosion here is a chunk of code concerning entry above and below the MA. 


You will notice that it buys under the MA and sells over the MA. 

However in the presentation of this EA it states the opposite. 

Have you read the description exactly? See:

"4. When to open the first trade: BUY if the 200 EMA is below the new bar. SELL is the 200 EMA is above the new bar."

 
Vladimir Karputov:

Have you read the description exactly? See:

"4. When to open the first trade: BUY if the 200 EMA is below the new bar. SELL is the 200 EMA is above the new bar."

Did you read what you wrote in the code?


The EA is doing the opposite of what is presented in the presentation above, however the code is working correctly.

 
moneyfoundbymichael :

Did you read what you wrote in the code?

Check the words "below" and "above" in the dictionary. Probably you misunderstand the meaning of these words.

I stop further discussion - I see no reason to argue.

 

Please explain why we are buying? The 200 SMA is clearly above the new bar. No argument here. This is trading and coding, we discuss and do NOT argue.



GalacticExplosion Forward Test

 

Vladimir, there are two parameters in the code:

ushort                     InpIndentAfter8th    = 10;                // Indent after the 8th position (in pips)
ushort                     InpIndentAfter9th=10;                // Indent after the 8th position (in pips)

but

InpIndentAfter9th

is not used anywhere, is it you changed your mind to use it or just overlooked it?

Thanks!

 
Igor Nistor:

Vladimir, there are two parameters in the code:

but

is not used anywhere, did you change your mind to use it or just overlooked it?

Thank you!

It was me experimenting, adding, removing and eventually not removing all the rubbish.