Home » Expert Advisor » Stochastic Oscillator EA

Stochastic Oscillator EA

Stochastic Oscillator EA - 1Stochastic Oscillator EA - 2Stochastic Oscillator EA - 3Stochastic Oscillator EA - 4Stochastic Oscillator EA - 5

Get the Stochastic Oscillator EA!

3.7/5233 ratings

About the Stochastic Oscillator

The Stochastic Oscillator Indicator was developed in the late 1950s by Dr. George Lane . The term stochastic refers to the point of a current price in relation to its price range over a period of time. The stochastic oscillator show 2 lines (Main and Signal line) and s support and resistance level. He is included in Metatrader. The default settings are: K% 5, D% 3 Slowing 3.

Trade logic of this forex robot

The Stochastic Oscillator EA is a forex robot based on the Stochastic Oscillator with its Main Line, Signal Line and the Support and Resistance levels. He included 5 Stochastic based entry and 3 exit strategies.

Entry Strategies:

  • Crossover in Oversold/Overbought Level: Trades if the Main and Signal lines crosses above or below the Support and Resistance levels.
  • Main Line BreakIn: Opens a long trade if the Main Line breaks into the above Level. Vice versa for short trade.
  • Main Line BreakOut: Opens a long trade if the Main Line breaks out of the above Level. Vice versa for short trade.
  • Signal Line BreakIn: Opens a long trade if the Signal Line breaks into the above Level. Vice versa for short trade.
  • Signal Line BreakOut: Opens a long trade if the Signal Line breaks out of the above Level. Vice versa for short trade.

Exit Strategies:

  • Exit On Crossover: Closes the trade on a crossover of the main and signal lines.
  • Main Line BreakThrough: Closes the trade if the Main Line crosses the predefined level.
  • Signal Line BreakThrough: Closes the trade if the Signal Line crosses the predefined level.

Stochastic Level Mode

If you set the Stochastic Level Mode to “Use only buy level” the Sell Entry Level and Sell Exit Levels will be calculated based on the Buy Levels like this:
Sell Entry Level = 100-Buy Entry Level. Sell Exit Level = 100-Sell Entry Level.

Versions overview

Functions Basic Advanced Pro
5 Entry Strategies
Money Management
Trade on new Bar
Inverse Strategy
3 Exit Strategies
Trailing Stop
Break Even
Spread Filter
MA Trend Filter
Candle Trail
ATR Trail
Day/Time Filter
Reverse on Opposite Signal
Trade Direction

Colored Stochastic Oscillator Indicator

Need a better stochastic Oscillator indicator? Download the free Colored Stochastic Oscillator Indicator.

Starter Bundle

The Stochastic Oscillator EA is included in the EA Starter Bundle.

More about the Stochastic Oscillator EA

  • You can install the Stochastic Oscillator EA on limitless demo and live accounts.
  • Note that this Metatrader Expert Advisor does not draw any indicator on the chart.
  • You do not understand all the functions? Take a look at our function glossary.
  • This EA is not pre-optimized. Please read the article about optimization first.
  • The license of every Expert Advisor you download is time limited, but you can re-download newer versions any time in your purchase history.
  • MT4 Basic v2.01
  • MT4 Advanced v2.03
  • MT4 Pro v2.04
  • Dez 13, 2017

  • Fixed: Problem with trading sessions of some brokers
  • Aug 28, 2017

  • Fixed: Martingale function in Pro version
  • Jul 21, 2017

  • Fixed: Main Line BreakThrough Exit Strategy
  • Jun 30, 2017

  • Fixed: The exit strategy did not work in some cases
  • Sep 22, 2016

  • Added: Has now 5 Entry Strategies
  • Added: Has now 3 Exit Strategies (Advanced and Pro)
  • Added: Reverse On Opposite Signal (Pro version)
  • May 24, 2016

  • Added: Exit Strategy in Advanced and Pro version
  • Added: Stochastic Level Mode
  • Jan 13, 2016

  • Minor updates and fixes in all MT4 versions
  • Added: ATR Trail to MT4 Pro version
  • Mar 17, 2015

  • Initial release MT4 Pro
  • Apr 11, 2015

  • Some improvements in all MT4 versions Added “Max once per Bar” function to all MT4 Advanced and Pro versions
  • Feb 07, 2015

  • Initial release

Need a good Forex Broker for your trading tools?

98 thoughts on “Stochastic Oscillator EA”

  1. tiiso says:

    what currency pair stochastic oscillator run

    1. Yannick says:

      It runs on all currency pairs.

  2. keetawat says:

    What about the notification feature, is this EA has the notification on it?

    1. Yannick says:

      No, unfortunately not at the moment.

  3. keetawat says:

    I used this EA and its high accuracy entry point and make a lot of profit, thanks a lot for your working hard.
    I have the question is how to setup the EA exit order by the indicator logic before TP.

    Thank you.

    1. Yannick says:

      Glad you like it.
      The Stochastic Oscillator EA has 3 exit strategy. Simply choose one of them.

  4. Pierre says:

    Hello ! That’s exactly what I was looking for, but it lacks the [Max Order] setting.
    Can you add it?

    Thank you for your response.

    1. Yannick says:

      No, unfortunately it is not possible to add this for now.

  5. Mehdi says:

    I have the advance version of the stochastic EA, I want it to ask if there is a possibility to add 2 more MA filters so I can have 3 filters with a different time frames at the same time, I wouldn’t mind to pay extra for it and you can send it to me to my email. I would really appreciate it.

    1. Yannick says:

      Unfortunately, at the moment I do not make custom modifications.

  6. hiren says:

    Hi sir, i want to know if this robot can reverse my signal.
    for example when an arrow appears for stochastic it is a buy or sell entrance but i want to know when an opposite arrow appears your robot closes previous the trade and reverse from buy to sell or the opposite.

    Also i want to use stochastic signal for every crossover signals , not only in overbought and oversold condition.

    Please tell settings to do the same.

    1. Yannick says:

      Use the reverseOnOppositeSignal function to reverse the trade.
      This is possible if you set the buyEntryLevel to 100 and the sellEntryLevel to 0.

      1. hiren says:


        On reverse to opposite signal , it will do on same bar or next bar.

        For eg, i am in buying position , whenever crossover appears , it will close buy first and then sell order place on same bar.

        1. Yannick says:

          The positions will be changed immediately after a new entry signal.

      2. Hiren says:

        Thanks sir,
        Can I place SL and TP for EA for using Reverse to opposite signal for stochastic EA

        Will SL and TP will close the trade as mentioned pip with Reverse to opposite signal = True ?

        1. Yannick says:

          Yes, it the trade hits SL or TP, the EA will close the trade, but it will not reverse the trade.

  7. George says:

    Hi i want to know if this robot can reverse my signal for example when an arrow appears for stochastic it is a buy or sell entrance but i want to know when an opposite arrow appears your robot closes the trade and reverse from buy to sell or the opposite? Thank you

    1. Yannick says:

      Yes, this can be done with the RevereOnOppositeSingal included in the pro version.

  8. ali janabi says:

    hello ,sir
    i hope to put option -profits-in this expert ,such if profit arrive 10$ ,will close all lots.

    1. Yannick says:

      I do not plan to implement this.

  9. ForexCue says:

    You say: Rest assured that all our programs work properly and your trading portfolio will not be endangered at any moment.

    But i have downloaded all your free EAs and back tested them all with 99% accuracy datas and different parameters, and well, none of them ever finished any testing positively…

    1. Yannick says:

      This does not mean that the EA will work profitably. All EAs need to be optimized first. It simply means that the EAs do not have any bugs which can lead to uncontrolled losses.

  10. Erick Contieri says:

    Hi Yannick, I bought the Stochastic EA some time ago but after some tests I noticed that the martingale only works 6 times. In the options I set to make 12 martingales but he only try 6 times,
    even with high balance in de acc.

    1. Yannick says:

      Can you please open a new topic in the forum and share your settings and a screenshot?

  11. Aziel says:

    Breakeven e ReverseOnOppositeSignal…. How to buy the Pro version and test these settings first? I liked it a lot, I’ve been using it and Free version and I got good profits with graphics times of H1 and H4 but with these settings I realized that I can decrease the losses and increase the gains,
    I’m going to buy the pro version. I just want to satisfy this doubt.

    1. Yannick says:

      You can’t test these function first since they are only implemented in the paid version. To learn more about these functions, please visit the function glossary.

  12. jcbillion says:

    Hello Yannick,

    Please i purchased the Stochastic Oscillator EA Pro and my broker is a 4 digit broker. I’ll like to know if the inputted stop loss and take profit differ for 4 and 5 digit brokers. i.e if i use 50pips take profit for a 5 digit broker, do i have to use 5pips for a 4 digit broker?


    1. Yannick says:

      The Stochastic EA automatically recognizes if you are using a 5 or 4 digits broker. The inputs remain the same. If you enter 50 as StopLoss, it will be 50pips on both (0.0050 on 4 digits / 0.00500 on 5 digits).

      1. jcbillion says:

        Hello Yannick, Please can you help me the settings for this trade criteria


        Entry -Main line crosses above 55 level
        Exit -Main line goes beyond and close below 80 level


        Entry -Main line crosses below 45 level
        Exit -Main line goes below and close above 20 level

        1. Yannick says:

          Use the MainLineBreakIn for the entry and the MainLineBreakThrough for the exit signal.

          1. jcbillion says:

            Hello Yannick,

            Thank you for always replying always.

            I use the Stochastic EA Pro on a four digit broker’s MT4, but I have encountered this challenge in a while, the EA opens a trade and almost immediately closes the trade costing me the spread and a trade that would have ended in profit if the trade hadn’t closed.

            Please can this be resolved???

          2. Yannick says:

            Your settings must be wrong. Please open a new topic in the forum and provide your settings.

          3. jcbillion says:

            I have created a Topic in the forum and uploaded my settings, please look it up. thanks

  13. Aziel says:

    I would like to know if there is a significant improvement of the free version for PRO of the Stogastic MT4, I did tests with changes only of the 20-80 pr a10-90 gave few inputs but very precise, I would like to leave in a shorter graphical time the PRO version does Martingale and has stop already programmed or I have enternder and I even program ??

    1. Yannick says:

      I’m sorry I do not understand your question about the martingale function. Please take a look at my functions glossary to read more about it.

  14. Vamsi says:

    I want to buy when signal line crosses 20 to upside and exit signal line moves below 70. Similarly, sell when signal line drops below 80 and exit when signal line moves above 30. What settings should I use?

    1. Yannick says:

      Use the default settings and change:
      Entry Strategy = Signal Line BreakOut
      Exit Strategy = Signal Line BreakThrough
      Buy Exit Level = 70;
      Sell Exit Level = 30;

  15. Martin says:

    Hi Yannick,
    If I change the Buy Entry level to 30 for example (instead of 20) does this include all levels below 30, or only when price is near 30 ?

    1. Yannick says:

      All levels below 30.

  16. Luis Chacon says:

    Do you have a version of the Stochastic Oscillator EA PRO for MT5? Tks

    1. Yannick says:

      No, unfortunately not yet. Please subscribe to my newsletter to stay up to date.

      1. Luis Chacon says:

        It confuses me, because I have a Demo Version of this Stochastic Oscilator Basic for MT5 that I have downloaded from your site and I would like to buy the PRO version.

        1. Yannick says:

          I have removed the MT5 versions because only a few were using them. I plan to rewrite/reoffer all MT5 products at the end of this year or beginning next year.

          1. Luis Chacon says:

            ah ok. Because here in Brasil I use MT5 my broker do not have MT4 as platform. Please, iwhen you have the stochastic PRO ( and others) for MT5 let me know. Tks a lot

          2. Yannick says:

            Please register to the newsletter to stay up to date.

  17. Sreekumar J says:

    Hello.. I want to set your Stochastic Pro Ea with the following entry and exit.
    Long when stochastic main crosses above 60 level and exit when main crosses below 50.
    Could you please inform me the settings on your EA?

    1. Yannick says:

      Inverse Strategy = true;
      Entry Strategy = Main Line BreakIn;
      Buy Entry Level = 40;
      Sell Entry Level = 60;
      Exit Strategy = Main Line Break Through;
      Buy Exit Level = 50;
      Sell Exit Level = 50;
      If you want to trade and exit immediately without waiting for a confirmation of a new bar, set TradeOnNewBar = false; ExitOnNewBar = false;
      If you have any other questions about your settings, please use the forum and provide your settings file.

  18. Justin says:


    Could you send me summary performance of the Stochastics EA with inputs such as 1000 deposit, and interval of 3 months from Jan to March for example. Revery back with performance metrics.

    Thank you

    1. Yannick says:

      Unfortunately, I do not have any statistics about its performance.

  19. manus says:

    What interval is to be followed for day trading? 1 hour duration?

    1. Yannick says:

      I would say H1 and less.

  20. Paul says:

    Thanks for this, is it possible to use two time frames (stochastics) at the same time, maybe on the pro version?

    1. Yannick says:

      This is possible with all versions. You just have to set a different MagicNumber each time you use the EA twice or more on the same symbol.

  21. Glenn Winstead says:

    With the pro version, can I substitute the StochasticRSI indicator found on
    This is a variation of the standard Stochastic RSI found on
    I presume there is a metatrader equivalent somewhere.
    Regards, Glenn

    1. Yannick says:

      No, it is not possible to include other indicators inside the Stochastic Oscillator EA

  22. jcbillion says:

    Hello Yannick, please i would like to know which among the five entry strategies to use if i want the EA to place a buy order when price closes above the 20 level and places a sell order when price closes below the 80 level. Thanks

    1. jcbillion says:

      I actually meant, when Main line closing above (20)/ below (80) levels not price. Thank you

    2. Yannick says:

      Use the “Main Line BreakIn” strategy and set the “Inverse Strategy” to true.

  23. Nick L says:


    Is it possible to only enter a trade if there was a recent 100 over 200 MA crossover with this EA?


    1. Yannick says:

      No, you only have the options to add one Moving Average as a filter and the EA will only trade if the price is either above or below it. A MA Cross as filter would require a custom modification.

      1. d says:

        is it possible to add 2 MAs to this Stochastic EA? like MA10 above MA50?

        For BUY condition, does MainLn break below 20 level, & had crossover, then break above 20 level?

        1. Yannick says:

          This is not possible with this EA, it would require a modification.

  24. Titos says:

    Hi Yannick, I have the following problem. I have the EA working from 7:00 to 22:00 every day, but at the end of the day any open position doesn’t close on the next crossover and remains open. Can you fix it?

    1. Yannick says:

      I just checked the source code and the exit strategy is not time filtered. Do you have the latest version 2.00?

  25. Titos says:

    Hi Yannick, it would be nice to add a news avoiding function in your Stochastic Oscillator EA soon. It will save us from a lot of trouble. Thanks

    1. Yannick says:

      Unfortunately the EA only has a normal time filter, but I was working on a news filter tool a while ago. Maybe is helps you.

  26. Narch says:

    Thanks a lots, Yannick, today I founded he doesn’t worked on money management but he used to worked that task last week.

    1. Yannick says:

      What are your MoneyManagement settings?

      1. Narch says:

        0.5, 1.0 lot size at 10 % risk (true, but open constant 0.5/1.0), when tried with 0.01 lot with 20 % risk he still open 0.01 lot size, my ACC is micro.

        1. Yannick says:

          It is difficult to help you with this in the comment section. Please open a new topic in the forum and provide your settings and some information about your account.

  27. Narongchai Pawongsaeng says:

    Yannick, all I want to know is, if I want to open order at crossover, also close at crossover, in both way long/short, any place on stochastic, what parameter do I have to put in, Buy Entry Level, Sell Entry Level, Buy Exit Level and Sell Exit Level?

    1. Yannick says:

      Set the BuyEntryLevel to 100 if you want to enter a buy trade on all Crossovers below that level (SellEntryLevel to 0).
      The ExitOnCrossover strategy does not need the ExitLevels. It will close the trade on the next crossover.
      Please also take a look at the CloseOnOppositeSignal function.

      1. olufemi ademola says:

        please, i didnt get this. i try to set for enty and exit at every cross

        1. Yannick says:

          Just set
          entryStrategy = crossover
          buyEntryLevel = 100
          sellEntryLevel = 0

          1. Musawenkosi Malambula says:

            i thought we buying at close to 0 and sell at lcosest to 100?

          2. Yannick says:

            True, I got that wrong 🙂

  28. lazarus machete says:


    i need an exper advisor based on the stochastic osc and EMA, moving average cross over, do u have it or can u built it?

    1. Yannick says:

      Please send me your strategy. Maybe I can make you a custom modification.

  29. Narongchai Pawongsaeng says:


    Yannick, I tried this awesome EA which is a long time I wish to have something like this, open and close position, its work well just for open position, but something lag or I mean its not closed the ordered at the any specified condition after profit, would you find out what is wrong, with my set up or something else? Do it it have to set exit level when set exit condition when crossover or, please help.


    1. Yannick says:

      It is going to be difficult to help you within the comment section. Please open a new topic, explain your problem and provide your settings.

  30. Denis says:

    Hello, this is what I have been looking for. But I would like to use it only for exiting a trade. I would manually open it. Is this possible?

    1. Yannick says:

      Unfortunately, this is currently not possible.

  31. Raakesh says:

    Hello, how do I set the time to trade ? Default setting is zero for start and end ? please guide. I am in India.

    1. Yannick says:

      The functions glossary will help you.

  32. Raakesh says:

    hello, I want to purchase the stochastic EA. does it have a trailing stop option. I am already trying out the free version on a cent account and I am quite happy withit.

    1. Yannick says:

      Yes, the advanced and pro versions do have a trailing stop function.

  33. Luter Jar says:

    Yannick, is it possible to select the timeframe of the MA filter on the Stoch EA. EA trades 1 hour on 15 min chart and uses the 15 min MA or trading 15min chart and MA in the direction of 1 hour Stoch.

    1. Yannick says:

      Yes, this is possible.

  34. Luter Jar says:

    Hi Yannick,
    Please help me understand the Exit Strategy. what do mean by Buy Exit Level and Sell Exit Level.
    Thanks in Advance

    1. Yannick says:

      You can define 2 exit levels. Example: if you enter a buy trade below the 20 line and the buy exit level is set to 60, the trade will be closed as soon as the stochastic reaches the level of 60.

  35. Luter Jar says:

    Hi, am interested in Stoch EA. is it compatible with ECN brokers? since ECN brokers do not accept orders with SL and TP. does the EA add the SL and TP at the next tick?

    1. Yannick says:

      Yes, the EA is ECN compatible. Try the basic version and you will see that is works.

  36. phattharaphon says:

    thank you

    1. Yannick says:

      You’re welcome 🙂

  37. ALEXANDER says:

    I want to trial this EA


    1. Yannick says:

      You can download the “stochastic oscillator ea basic” for free to try it.

  38. hag says:

    Thank you

  39. Vised Srisutam says:

    อยากได้ ea

Leave a Reply to Justin Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.