Showing posts with label futures. Show all posts
Showing posts with label futures. Show all posts

Sunday, 3 June 2018

tradeciety stochastics price action indicator codes mt4



The stochastics indicator is also a price action indicator.It is compared to the price indicator, posted in the chart below. Stochastic is used by professionals and bank traders.They use it on daily and 4 hour charts.There are less false signals on 28/6/10 settings

Please take this free knowledge and wisdom from the thread, to improve your trading.
The technical analysis is already available on the free charts .The stochastic indicator is already doing the price action analysis on most trader's charts.This eliminates the need for price action candle by candle,analysis for longer term swing traders and trend  traders.





stochastics will result in demise of charlatan price action educators..Avoid quacks and charlatan educators.




make up your own mind ,I am providing evidence




just put this on mt4 and compile

//+------------------------------------------------------------------+
//| best price action course free tradeciety          Stochastic.mq4 |
//|                   Copyright 2005-2014, MetaQuotes Software Corp. |
//|                       tradeciety             http://www.mql4.com |
//+------------------------------------------------------------------+
#property copyright   "2005-2014, MetaQuotes Software Corp."
#property link        "http://www.mql4.com"
#property description "Stochastic Oscillator"
#property strict

#property indicator_separate_window
#property indicator_minimum    0
#property indicator_maximum    100
#property indicator_buffers    2
#property indicator_color1     LightSeaGreen
#property indicator_color2     Red
#property indicator_level1     20.0
#property indicator_level2     80.0
#property indicator_levelcolor clrSilver
#property indicator_levelstyle STYLE_DOT
//--- input parameters
input int InpKPeriod=28; // K Period
input int InpDPeriod=6; // D Period
input int InpSlowing=10; // Slowing
//--- buffers
double ExtMainBuffer[];
double ExtSignalBuffer[];
double ExtHighesBuffer[];
double ExtLowesBuffer[];
//---
int draw_begin1=0;
int draw_begin2=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit(void)
  {
   string short_name;
//--- 2 additional buffers are used for counting.
   IndicatorBuffers(4);
   SetIndexBuffer(2, ExtHighesBuffer);
   SetIndexBuffer(3, ExtLowesBuffer);
//--- indicator lines
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0, ExtMainBuffer);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1, ExtSignalBuffer);
//--- name for DataWindow and indicator subwindow label
   short_name="Sto("+IntegerToString(InpKPeriod)+","+IntegerToString(InpDPeriod)+","+IntegerToString(InpSlowing)+")";
   IndicatorShortName(short_name);
   SetIndexLabel(0,short_name);
   SetIndexLabel(1,"Signal");
//---
   draw_begin1=InpKPeriod+InpSlowing;
   draw_begin2=draw_begin1+InpDPeriod;
   SetIndexDrawBegin(0,draw_begin1);
   SetIndexDrawBegin(1,draw_begin2);
//--- initialization done
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Stochastic oscillator                                            |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
   int    i,k,pos;
//--- check for bars count
   if(rates_total<=InpKPeriod+InpDPeriod+InpSlowing)
      return(0);
//--- counting from 0 to rates_total
   ArraySetAsSeries(ExtMainBuffer,false);
   ArraySetAsSeries(ExtSignalBuffer,false);
   ArraySetAsSeries(ExtHighesBuffer,false);
   ArraySetAsSeries(ExtLowesBuffer,false);
   ArraySetAsSeries(low,false);
   ArraySetAsSeries(high,false);
   ArraySetAsSeries(close,false);
//---
   pos=InpKPeriod-1;
   if(pos+1<prev_calculated)
      pos=prev_calculated-2;
   else
     {
      for(i=0; i<pos; i++)
        {
         ExtLowesBuffer[i]=0.0;
         ExtHighesBuffer[i]=0.0;
        }
     }
//--- calculate HighesBuffer[] and ExtHighesBuffer[]
   for(i=pos; i<rates_total && !IsStopped(); i++)
     {
      double dmin=1000000.0;
      double dmax=-1000000.0;
      for(k=i-InpKPeriod+1; k<=i; k++)
        {
         if(dmin>low[k])
            dmin=low[k];
         if(dmax<high[k])
            dmax=high[k];
        }
      ExtLowesBuffer[i]=dmin;
      ExtHighesBuffer[i]=dmax;
     }
//--- %K line
   pos=InpKPeriod-1+InpSlowing-1;
   if(pos+1<prev_calculated)
      pos=prev_calculated-2;
   else
     {
      for(i=0; i<pos; i++)
         ExtMainBuffer[i]=0.0;
     }
//--- main cycle
   for(i=pos; i<rates_total && !IsStopped(); i++)
     {
      double sumlow=0.0;
      double sumhigh=0.0;
      for(k=(i-InpSlowing+1); k<=i; k++)
        {
         sumlow +=(close[k]-ExtLowesBuffer[k]);
         sumhigh+=(ExtHighesBuffer[k]-ExtLowesBuffer[k]);
        }
      if(sumhigh==0.0)
         ExtMainBuffer[i]=100.0;
      else
         ExtMainBuffer[i]=sumlow/sumhigh*100.0;
     }
//--- signal
   pos=InpDPeriod-1;
   if(pos+1<prev_calculated)
      pos=prev_calculated-2;
   else
     {
      for(i=0; i<pos; i++)
         ExtSignalBuffer[i]=0.0;
     }
   for(i=pos; i<rates_total && !IsStopped(); i++)
     {
      double sum=0.0;
      for(k=0; k<InpDPeriod; k++)
         sum+=ExtMainBuffer[i-k];
      ExtSignalBuffer[i]=sum/InpDPeriod;
     }
//--- OnCalculate done. Return new prev_calculated.
   return(rates_total);
  }
//+------------------------------------------------------------------+



Trend trading has no edge 80% of trends fail and lose money

Micael covel makes money from selling books, seminars and education.Those who can trade trends trade for a living, those who can't write books and selling seminars for a living.Trend following does not make money.
charlatan educators
How much misinformation is posted in the internet ,books,analysis, quack forums, seminars etc etc etc?Just imagine 20,000 trading books, there is only one road from A to B ,yet traders are bombarded with 20,000 maps, one indicator does the job yet there are over 5,000 indicators on mql4.com site.If a driver had 5,000 indicators, he would not not which direction to take, in his very simple journey.

https://community.ig.com/t5/General-Trading-Strategy/Trading-misinformation-Quack-views-on-brokers-and-trading/td-p/26398


Trend following not working on my 7,000 backtests !

http://www.trade2win.com/boards/trading-systems/226850-trend-following-not-working-my-7-000-backtests.html

Why 80% fail at using a trend following technique to trade the forex




Why 80% fail at using a trend following technique to trade the forex




Trend trading failure of trend breakouts

THE TREND IS YOUR FRIEND UNTIL THE END WHEN IT BENDS.

Trends are only visible in hindsight , as image example below shows .Most trend traders lose money in chop , when breakouts become consolidation zones.There are more trend failures than trends materializing , most traders lose money trying to find the illusive trends.




The difficult journey making profitable EAS



The previous versions have been caught in choppy markets , as per images.The Eas are good bit the markets are very choppy, I am bringing out newer versions advanced versions to make money in choppy markets.