how to put codes for oscillators - page 7

 
Vladimir Karputov:

You are not inserting the code correctly in the forum. Please insert the code correctly:

Insert the code correctly: when you are editing a post, press the button andyou will be promptedto insert your code in the window that will appear. Or you can paste your code using the

 

***

Открой новые возможности в MetaTrader 5 с сообществом и сервисами MQL5
Открой новые возможности в MetaTrader 5 с сообществом и сервисами MQL5
  • 2021.04.21
  • www.mql5.com
MQL5: язык торговых стратегий для MetaTrader 5, позволяет писать собственные торговые роботы, технические индикаторы, скрипты и библиотеки функций
 
financion.comission:

Vladimir when downloading from zip folder 777 the information filled in the new EA by itself ... I only had to delete the old EA 777 as told and press the compile button ... no need to insert anything ... Sorry but it's not my fault ...

Let's try again - I renamed the folder and the Expert Advisor

Copy it here

Signal_Stoch_W

bugs

Files:
 
Vladimir Karputov:

You are not inserting the code correctly in the forum. Please insert the code correctly:

Insert the code correctly: when you are editing a post, press the button andyou will be promptedto insert your code in the window that will appear. Or you can paste your code using the button

I did as you said ... through these buttons ... Vladimir the point is that compiler gives out a bunch of errors ... that's the problem ...

 
financion.comission:

I did as you said ... through these buttons ... vladimir the point is that the compiler gives a lot of errors ... that's the problem ...

What does the compiler have to do with it, if the point is that for almost ten pages you have been persistently INPUTING the code IN THE WRONG WAY.

Insert the code correctly: at the time of editing the post, click Code, in the window that appears,insert your code. Or you can use the Attach file button to attach the code.

 
SanAlex:

Let's try again - I renamed the folder and the expert

Copy here


San alex - I'm filling automatically in the new EA on the basis of the data you sent me ... I do not interfere in any way ... and my computer is new 10 Windows 64 bit ... Sorry but I got 16 errors and one warning ... how do I get you to see it for yourself ...

 
financion.comission:

San alex - I fill in automatically in a new EA based on the data you send me ... I do not interfere in any way ... and my computer is new 10 Windows 64 bit ... sorry i got 16 errors and one warning ... how do i get you to see it for yourself ...

Skype has the ability to show the desktop ...

 
SanAlex:

Let's try again - I renamed the folder and the expert

Copy here


//+------------------------------------------------------------------+
//|                                               Signal_Stoch_W.mq5 |
//|                                  Copyright 2021, MetaQuotes Ltd. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2021, MetaQuotes Ltd."
#property link      "https://www.mql5.com"
#property version   "1.00"
//+------------------------------------------------------------------+
//| Include                                                          |
//+------------------------------------------------------------------+
#include <Expert\Expert.mqh>
//--- available signals
#include "CCP_Stoch_M.mqh"
//--- available trailing
#include <Expert\Trailing\TrailingNone.mqh>
//--- available money management
#include <Expert\Money\MoneyFixedLot.mqh>
//+------------------------------------------------------------------+
//| Inputs                                                           |
//+------------------------------------------------------------------+
//--- inputs for expert
input string         Expert_Title           ="Signal_Stoch_W"; // Document name
ulong                Expert_MagicNumber     =21346;            //
bool                 Expert_EveryTick       =false;            //
//--- inputs for main signal
input int            Signal_ThresholdOpen   =10;          // Signal threshold value to open [0...100]
input int            Signal_ThresholdClose  =10;          // Signal threshold value to close [0...100]
input double         Signal_PriceLevel      =0.0;         // Price level to execute a deal
input double         Signal_StopLevel       =90.0;        // Stop Loss level (in points)
input double         Signal_TakeLevel       =36.0;        // Take Profit level (in points)
input int            Signal_Expiration      =4;           // Expiration of pending orders (in bars)
input int            Signal_Stoch_PeriodK   =5;           // Stochastic(5,3,3,...) K-period
input int            Signal_Stoch_PeriodD   =3;           // Stochastic(5,3,3,...) D-period
input int            Signal_Stoch_PeriodSlow=3;           // Stochastic(5,3,3,...) Period of slowing
input ENUM_STO_PRICE Signal_Stoch_Applied   =STO_LOWHIGH; // Stochastic(5,3,3,...) Prices to apply to
input double         Signal_Stoch_Weight    =1.0;         // Stochastic(5,3,3,...) Weight [0...1.0]
//--- inputs for money
input double         Money_FixLot_Percent   =10.0;        // Percent
input double         Money_FixLot_Lots      =0.1;         // Fixed volume
//+------------------------------------------------------------------+
//| Global expert object                                             |
//+------------------------------------------------------------------+
CExpert ExtExpert;
//+------------------------------------------------------------------+
//| Initialization function of the expert                            |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- Initializing expert
   if(!ExtExpert.Init(Symbol(),Period(),Expert_EveryTick,Expert_MagicNumber))
     {
      //--- failed
      printf(__FUNCTION__+": error initializing expert");
      ExtExpert.Deinit();
      return(INIT_FAILED);
     }
//--- Creating signal
   CExpertSignal *signal=new CExpertSignal;
   if(signal==NULL)
     {
      //--- failed
      printf(__FUNCTION__+": error creating signal");
      ExtExpert.Deinit();
      return(INIT_FAILED);
     }
//---
   ExtExpert.InitSignal(signal);
   signal.ThresholdOpen(Signal_ThresholdOpen);
   signal.ThresholdClose(Signal_ThresholdClose);
   signal.PriceLevel(Signal_PriceLevel);
   signal.StopLevel(Signal_StopLevel);
   signal.TakeLevel(Signal_TakeLevel);
   signal.Expiration(Signal_Expiration);
//--- Creating filter CSignalStoch
   CCP_Stoch *filter0=new CCP_Stoch;
   if(filter0==NULL)
     {
      //--- failed
      printf(__FUNCTION__+": error creating filter0");
      ExtExpert.Deinit();
      return(INIT_FAILED);
     }
   signal.AddFilter(filter0);
//--- Set filter parameters
   filter0.StochPeriodK(Signal_Stoch_PeriodK);
   filter0.StochPeriodD(Signal_Stoch_PeriodD);
   filter0.StochPeriodSlow(Signal_Stoch_PeriodSlow);
   filter0.StochApplied(Signal_Stoch_Applied);
   filter0.Weight(Signal_Stoch_Weight);
//--- Creation of trailing object
   CTrailingNone *trailing=new CTrailingNone;
   if(trailing==NULL)
     {
      //--- failed
      printf(__FUNCTION__+": error creating trailing");
      ExtExpert.Deinit();
      return(INIT_FAILED);
     }
//--- Add trailing to expert (will be deleted automatically))
   if(!ExtExpert.InitTrailing(trailing))
     {
      //--- failed
      printf(__FUNCTION__+": error initializing trailing");
      ExtExpert.Deinit();
      return(INIT_FAILED);
     }
//--- Set trailing parameters
//--- Creation of money object
   CMoneyFixedLot *money=new CMoneyFixedLot;
   if(money==NULL)
     {
      //--- failed
      printf(__FUNCTION__+": error creating money");
      ExtExpert.Deinit();
      return(INIT_FAILED);
     }
//--- Add money to expert (will be deleted automatically))
   if(!ExtExpert.InitMoney(money))
     {
      //--- failed
      printf(__FUNCTION__+": error initializing money");
      ExtExpert.Deinit();
      return(INIT_FAILED);
     }
//--- Set money parameters
   money.Percent(Money_FixLot_Percent);
   money.Lots(Money_FixLot_Lots);
//--- Check all trading objects parameters
   if(!ExtExpert.ValidationSettings())
     {
      //--- failed
      ExtExpert.Deinit();
      return(INIT_FAILED);
     }
//--- Tuning of all necessary indicators
   if(!ExtExpert.InitIndicators())
     {
      //--- failed
      printf(__FUNCTION__+": error initializing indicators");
      ExtExpert.Deinit();
      return(INIT_FAILED);
     }
//--- ok
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Deinitialization function of the expert                          |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
   ExtExpert.Deinit();
  }
//+------------------------------------------------------------------+
//| "Tick" event handler function                                    |
//+------------------------------------------------------------------+
void OnTick()
  {
   ExtExpert.OnTick();
  }
//+------------------------------------------------------------------+
//| "Trade" event handler function                                   |
//+------------------------------------------------------------------+
void OnTrade()
  {
   ExtExpert.OnTrade();
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnTimer()
  {
   ExtExpert.OnTimer();
  }
//+------------------------------------------------------------------+
 
Vladimir Karputov:

Skype has an option to show the desktop ...

I haven't changed anything here !!!!

 
financion.comission:

with these pound/$$ settings - for this year - 30 minutes

pound quid

 
Vladimir Karputov:

Skype has an option to show the desktop ...

I mean the codes you sent correctly like you said...