Stochastics – An example of a trading system using Slow Stochastics

This topic contains 0 replies, has 1 voice, and was last updated by Seer Seer 7 years, 8 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #644
    Seer
    Seer
    Keymaster

    The Stochastic Oscillator was developed by George Lane. This simple trading system uses the slow stochastic which uses an additional moving average to smooth the %d line.

    Rules:
    Sell when the %k line crosses below the %d line from above the 80 Level.
    Buy when the %k line crosses above the %d line from below the 20 Level.

    #Basic Stochastics System
    #Sell when the %k line crosses below the %d line from above the 80 Level.
    #Buy when the %k line crosses above the %d line from below the 20 Level.
    
    #Get the Stochastics columns
    my ($k,$d)=SS(5,3,3);
    
    unless (Position) {
      #Buy if the %k crosses above %d and if %k is less than 20
      BuyOpen if Crossover($k,$d) and Today($k)<20;
    }
    else {
      #Sell if the %k crosses under the $d and if %k is greater than 80
      SellOpen if Crossunder($k,$d) and Today($k)>80;
    }
    • This topic was modified 7 years, 8 months ago by  jez.
    • This topic was modified 7 years, 8 months ago by Seer Seer.
    • This topic was modified 7 years, 8 months ago by Seer Seer.
    • This topic was modified 7 years, 8 months ago by Seer Seer.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.