The indicator is not written correctly
The point is that the indicator is written correctly - almost like this one - the difference is that more currencies have been added
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_plots 1
#property indicator_type1 DRAW_HISTOGRAM
#property indicator_color1 Red
#property indicator_width1 1
#property indicator_style1 STYLE_SOLID
//------------------------------------------------------------------------------
input int bar_otrisovki=500; // количество баров для отрисовки индикатора
int i;
double rashit1Buffer[];
MqlRates mrate[];
int OnInit()
{
//--- indicator buffers mapping
SetIndexBuffer(0,rashit1Buffer,INDICATOR_DATA);
//---
PlotIndexSetString(0,PLOT_LABEL,"AUDNZD");
//---
ArraySetAsSeries(rashit1Buffer,true);
//---
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
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[])
{
//---Убедимся в том, что значения наших массивов для котировок, указаны как таймсерии
ArraySetAsSeries(mrate,true);
//+------------------------------------------------------------------+
//| Загружаем катировки |
//+------------------------------------------------------------------+
if(CopyRates("AUDNZD",_Period,0,bar_otrisovki,mrate)<0)
{
Print(" Ошибка копирования исторических котировок символа AUDNZD - ошибка: ",GetLastError(),"!");
return(0);
}
//---
int limit=1;
if(prev_calculated>0)// обработано баров на предыдущем вызове
limit=1;
else
limit=bar_otrisovki;
//--- расчёт индикатора
for(i=limit-1;i>=0;i--)
{
rashit1Buffer[i]=mrate[i].close;
}
//--- return value of prev_calculated for next call
return(rates_total);
}
//+------------------------------------------------------------------+
The point is that the indicator is written correctly - almost like this one - the difference is that more currencies have been added and that's it
Are these the keywords?
- www.mql5.com
This is very important information for your dtz, especially for AUDNZD. They will do anything. You have to protect yourself somehow. Have you thought about it?
1) Can my DC access my EA code through the terminal?
This question will not be answered here. At most you will get a banter on the subject. Think about it: for a positive answer to the question you need at least two conditions:
1) the platform must allow the broker access to the client terminal files;
2) the broker must have an .ex5 file decryptor, which at this stage of platform development only MQ could offer.
Assess for yourself how likely it is that such conditions will be disseminated upon request by the average user (even if such conditions do exist).
No one will answer that question for you here. At most, you will get a joke on the subject. Think about it: for a positive answer to the question at least two conditions must be met:
1) the platform must allow the broker access to the client terminal files;
2) the broker must have an .ex5 file decryptor, which at this stage of platform development only MQ could offer.
Assess for yourself how likely it is that such conditions will be disseminated upon request by the average user (even if such conditions do exist).
Another protection option is to enable encryption of the EA file (in the properties). It will not be read on another computer. You have to be careful, otherwise you will not be able to read it :)
Close this thread.
Stop bringing up the same nonsense over and over again.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Greetings all!
As they say, a question for the experts!
Some time ago I wrote a certain indicator and later developed an Expert Advisor based on it.
The idea turned out to be interesting! However, I noticed that everything was working on the history and the system just stood still - the indicator almost never moved away from zero. The indicator uses several prices of different currencies at the same time - without averages, without price accumulation or anything like that. And what was my surprise when on the next day this indicator was jumping like crazy on the previous "quiet" day.
This raised 2 questions.
1) Does my brokerage company have access to the code of my EA-indicator through the terminal?
2) What happened to the prices and why they changed them in the terminal?