Experts: EA Stochastic

 

EA Stochastic:

Trading based on indicator iStochastic (Stochastic Oscillator, Stochastic). Stop Loss, Take Profit, and Trailing of a position can be enabled/disabled.


Author: Vladimir Karputov

 

Hi, I tested it on a hedging account and saw that it always opens two orders in opposite directions. Is that right?

If so, what is the stochastic for?


Thanks

 
sergiomt :

Hi, I tested it on a hedging account and saw that it always opens two orders in opposite directions. Is that right?

If so, what's the point of the stochastic?


Thank you

Decision block:

//+------------------------------------------------------------------+
//| Expert tick function|
//+------------------------------------------------------------------+
void OnTick()
  {
   Trailing();
//---
   if(IsPositionExists())
      return;

   double array[];
   if(iStochasticGet(MAIN_LINE,0,InpComparedBar,array))
     {
      ArraySetAsSeries(array,true);
      if(array[0]<InpLevelUP && array[InpComparedBar-1]<InpLevelUP)
        {
         if(!RefreshRates())
            return;
         double sl=(InpStopLoss==0)?0.0:m_symbol.Ask()-ExtStopLoss;
         double tp=(InpTakeProfit==0)?0.0:m_symbol.Ask()+ExtTakeProfit;
         OpenBuy(sl,tp);
        }
      if(array[0]>InpLevelDOWN && array[InpComparedBar-1]>InpLevelDOWN)
        {
         if(!RefreshRates())
            return;
         double sl=(InpStopLoss==0)?0.0:m_symbol.Bid()+ExtStopLoss;
         double tp=(InpTakeProfit==0)?0.0:m_symbol.Bid()-ExtTakeProfit;
         OpenSell(sl,tp);
        }
     }
  }
/
 

Hi thanks for the code. 
there are 2 errors in compliling. 
line 261 and 267 

return(INIT_FAILED); Expression not boolean

Thanks 

 
ivanoman :

Hi thanks for the code. 
there are 2 errors in compliling. 
line 261 and 267 

return(INIT_FAILED); Expression not boolean

Thanks 

Version 1.001 ( EA Stochastic ) has been uploaded . Replaced the trading engine. Description (at least in the Russian part of the forum) updated.

 
'INIT_FAILED' - expression not boolean EA Stochastic.mq5 261 20
'INIT_FAILED' - expression not boolean EA Stochastic.mq5 267 17

 
brutusjp:
'INIT_FAILED' - expression not boolean EA Stochastic.mq5 261 20
'INIT_FAILED' - expression not boolean EA Stochastic.mq5 267 17

Forum on trading, automated trading systems and testing trading strategies

Experts: EA Stochastic

Vladimir Karputov, 11.10.2019 12:32

Version 1.001 ( EA Stochastic ) has been uploaded . Replaced the trading engine.Description (at least in the Russian part of the forum) updated.


 
The EA_Stochastic is not working. When I compile the EA_Stochastic.mq5 then I get 2 errors. The first error in row 261 and the second error in row 267 - both errors are from the same type: "INIT_FAILED" - expression not boolean. Where is the mistake in the code?
 
Version 1.001 is available in the Russian forum.
EA Stochastic
EA Stochastic
  • www.mql5.com
ксперт торгует по индикатору Stochastic. Уровни Стоп лосс и Тейк профит можно отключать (в настройках задается значение "0"). Размер позиции можно задавать вручную (советник будет торговать постоянным лотом) или же лот может рассчитываться автоматически (как процент риска на сделку). Входные параметры Stochastic: K-period - K-период (количество...
 
How do I get the source code it's the first time using the code base platform
 
Jogolo:
How do I get the source code it's the first time using the code base platform
Seehow to download robots for free
Как бесплатно скачать торговых роботов из Библиотеки MetaTrader 4/5?
Как бесплатно скачать торговых роботов из Библиотеки MetaTrader 4/5?
  • 2015.09.24
  • www.youtube.com
Каждый трейдер может скачать любой из тысячи торговых роботов и технических индикаторов совершенно бесплатно. И мы покажем, насколько это просто сделать в Me...