Kontiko Gemail:
Hey.
I need people to rectify my code.
I attach my file on message.
It's stochastique and MA.
I need to show value of stochastique and the MA on stochastic same as on picture on screenshot.
Thank your for helping me please.
//+------------------------------------------------------------------+ //| 3100.mq4 | //| Kontiko | //| | //+------------------------------------------------------------------+ #property copyright "Kontiko" #property link "" #property version "1.00" #property strict #include <stderror.mqh> #include <stdlib.mqh> //Configuration Sochastique int InpKPeriod = 60; int InpDPeriod = 1; int InpSlowing = 1; ENUM_MA_METHOD InpStoMethod = MODE_SMA; int InpStoPrice = 0; //Configuration Moving Average int InpSlowPeriod = 200; ENUM_MA_METHOD InpSlowMethod = MODE_SMA; double BufferStochastic[]; double SlowMA; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { ArrayResize(BufferStochastic,InpSlowPeriod+1); //--- create timer EventSetTimer(60); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- destroy timer EventKillTimer(); } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- FillBuffer(); } void FillBuffer() { for (int ix=0; ix<=InpSlowPeriod; ix++) BufferStochastic[ix] = iStochastic(Symbol(),Period(),InpKPeriod,InpDPeriod,InpSlowing,InpStoMethod,InpStoPrice,MODE_MAIN,ix); for (int i=0; i<=InpSlowPeriod; i++) { // BufferStochastic[i] = iStochastic(Symbol(),Period(),InpKPeriod,InpDPeriod,InpSlowing,InpStoMethod,InpStoPrice,MODE_MAIN,i); SlowMA = iMAOnArray(BufferStochastic,0,InpSlowPeriod,0,InpSlowMethod,i); Comment("MA value " + DoubleToString(SlowMA, Digits)+ "\n" + "STOCH value " + DoubleToString(BufferStochastic[i], Digits)); } } //+------------------------------------------------------------------+ //| Timer function | //+------------------------------------------------------------------+ void OnTimer() { //--- } //+------------------------------------------------------------------+ //| ChartEvent function | //+------------------------------------------------------------------+ void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) { //--- } //+------------------------------------------------------------------+ //+------------------------------------------------------------------+
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hey.
I need people to rectify my code.
I attach my file on message.
It's stochastique and MA.
I need to show value of stochastique and the MA on stochastic same as on picture on screenshot.
Thank your for helping me please.