Stochastic EA

 
Hello

Does anyone seen simple Stochastic EA? Where short position will be opened when stochastic shows (overbought [above 70]) and long when oversold [above 30] ?

I would be grateful if someone could give mme the link.

Regards,

Dmitry
 

Did you search the Codebase ?

Search

 
RaptorUK:

Did you search the Codebase ?

Search


I have Raptor, but there seems to be all sorts of stuff apart from pure strategy in this sense. Did you see any?
 
DmitryS:

I have Raptor, but there seems to be all sorts of stuff apart from pure strategy in this sense. Did you see any?
Sorry, I don't work with Technical Indicators . . . I don't know a Stochastic from a Bollinger Band. Might there be something you could modify ?
 
RaptorUK:
Sorry, I don't work with Technical Indicators . . . I don't know a Stochastic from a Bollinger Band. Might there be something you could modify ?

I have an interesting code that I have downloaded here, but for some reasons when I test it there are no trades placed.
Files:
 

That code doesn't test return values from OrderSend so it doesn't tell you what is wrong if the OrderSend fails . . . bad coding. Are you trying it on Demo or in the Strategy Tester ? if Demo and your Broker is an ECN Broker it won't work . . .

It also doesn't adjust for 4 vs 5 digit Brokers . . .

Also, this loop is wrong . . .

//fecha posições
     for(cnt=OrdersTotal();cnt>=0;cnt--)

it should start from OrdersTotal()-1 . . . at least it is counting down, that is a good thing ;-)

it then does an OrderSelect and doesn't check if the OrderSelect works . . . first run through the loop the OrderSelect will fail . . .

 

This makes no sense . . .

if(Sinal() == 1 && lastorder != 1)
                  {
         OrderSend(Symbol(),OP_BUY,Lots,Ask,0,Ask-(SL*p),Ask+(TP*p),"Compra  "+CurTime(),0,0,White);
         return(0);
         lastorder = 1;
        }

this line is never executed . . . .

lastorder = 1;

because of the return . . .

 
DmitryS:

I have an interesting code that I have downloaded here, but for some reasons when I test it there are no trades placed.


That is where it begins to learn how to program

Read the code and check Book what it has to do....

So no trade ......

Is there a Sinal()

Is (OrdersPerSymbol<1)

or maybe

   if(AccountFreeMargin()<(1000*Lots))        {Print("Não possui dinheiro suficiente"); return(0);}
   if(Bars<100)                               {Print("-----NO BARS "); return(0);}
Start learning..... Succes