- www.mql5.com
- How to get Ratio of 2 Moving averages
- Equity Trailing EA MT5
- Voluntary certification of programmers in the Work service
Are you okay?
Thank you
Here's the code. I don't think it's a bad formated
//+------------------------------------------------------------------+ //| Moving average beginner tutorial.mq5 | //| Copyright 2023, GwDs | //| Need more help? Contact me on | //| https://www.mql5.com/fr/users/william210 | //+------------------------------------------------------------------+ #property copyright "Copyright 2023, GwDs" #property version "1.00" #property description "Moving average beginner tutorial to learn" #property description "Need more help? Contact me on https://www.mql5.com/fr/users/william210" /*--- Indicator preference */ input group "Moving average beginner tutorial to learn" input uchar g_MAPeriod = 20; // Averaging period input uchar g_MAShift = 0; // Horizontal shift input ENUM_MA_METHOD g_MAMethod = MODE_SMA; // Smoothing type input ENUM_APPLIED_PRICE g_MAApplied = PRICE_CLOSE; // Type of price /*--- Graph placement */ #property indicator_chart_window /*--- Buffer declaration */ #property indicator_buffers 1 // Number of buffer displayed double g_BufferMA[]; // Data buffer int g_PtMA; // Pointer of the iMA function #define indexiMA 0 // Index of buffer #property indicator_plots 1 // number of plot on the graph /*--- Buffer plot characteristics */ #property indicator_label1 "Moving average" #property indicator_type1 DRAW_LINE // Plot type #property indicator_color1 clrRed // Plot Color #property indicator_style1 STYLE_SOLID // Plot style #property indicator_width1 1 // Plot width //+------------------------------------------------------------------+ //| OnInit | //+------------------------------------------------------------------+ int OnInit() { /*--- Handle Creation */ g_PtMA = iMA(Symbol(), Period(), g_MAPeriod, g_MAShift, g_MAMethod, g_MAApplied); if(g_PtMA == INVALID_HANDLE) { PrintFormat("Error when creating iMA pointer"); return(INIT_FAILED); } /*--- Transforms the array into display buffer */ SetIndexBuffer(indexiMA, g_BufferMA, INDICATOR_DATA); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| OnCalculate | //+------------------------------------------------------------------+ 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[]) { if(prev_calculated < rates_total) { if(CopyBuffer(g_PtMA, 0, prev_calculated, rates_total, g_BufferMA) < 0) { PrintFormat("Error in data recovery"); return (0); } } return(rates_total); } //+------------------------------------------------------------------+
Are you okay?
Thank you
I'm not sure I understood everything because he refused me once, but here it's good.
Here is the link for this tutorial so
This format is accepted it seems
- www.mql5.com
Good morning
Have a nice week end ?
I can see that in fact there are several codebases, one per language in fact
The english codebase for example
https: //www.mql5.com/en/code
How to post the same code with translation of the description in several codebases of the site?
I restart the code submission creation with the wizard in the language where I want to submit the code?
Good morning
Have a nice week end ?
I can see that in fact there are several codebases, one per language in fact
The english codebase for example
How to post the same code with translation of the description in several codebases of the site?
I restart the code submission creation with the wizard in the language where I want to submit the code?
You don't have to! With a click on the triangle you can select your language:
=>
Thank you for your answer
Alas, I cannot find these icons at all when I edit the code that I have already submitted.
I would love a little more help on this, Thanks
I did like last time, but it does not pass he tells me that the main file is not found?
He's there??
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use