Исходный код · ID 5000
precision trend 2.2 (histo+alerts+lines).mq5
Вы автор или правообладатель?
Сообщите нам, если считаете, что материал размещён без разрешения.
Сообщить о материале
Обращение по товару «precision trend 2.2 (histo+alerts+lines).mq5» отправится на рассмотрение. Укажите контакт для ответа и опишите причину.
Поиск по коду файла
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 clrGreen
#property indicator_color2 clrRed
#property indicator_width1 2
#property indicator_width2 2
#property indicator_minimum -1
#property indicator_maximum 1
#property strict
extern ENUM_TIMEFRAMES TimeFrame = PERIOD_CURRENT; // Time frame
input int avgPeriod = 30; // Average period
input double sensitivity = 3; // Sensitivity
input bool AlertsOn = false; // Turn alerts on?
input bool AlertsOnCurrent = false; // Alerts on still opened bar?
input bool AlertsMessage = true; // Alerts should display message?
input bool AlertsSound = false; // Alerts should play a sound?
input bool AlertsNotify = false; // Alerts should send a notification?
input bool AlertsEmail = false; // Alerts should send an email?
input string SoundFile = "alert2.wav"; // Sound file
input bool verticalLinesVisible = false; // Show vertical lines true/false?
input bool linesOnNewest = false; // Vertical lines drawn on newest bar of higher time frame bar true/false?
input string verticalLinesID = "prc Lines"; // Lines ID
input color verticalLinesUpColor = clrDeepSkyBlue; // Lines up color
input color verticalLinesDnColor = clrPaleVioletRed; // Lines down color
input ENUM_LINE_STYLE verticalLinesStyle = STYLE_DOT; // Lines style
input int verticalLinesWidth = 0; // lines width
double upBuffer[],dnBuffer[],count[],trend[];
string indicatorFileName;
#define _mtfCall(_buff,_ind) iCustom(NULL,TimeFrame,indicatorFileName,0,avgPeriod,sensitivity,AlertsOn,AlertsOnCurrent,AlertsMessage,AlertsSound,AlertsNotify,AlertsEmail,SoundFile,verticalLinesVisible,linesOnNewest,verticalLinesID,verticalLinesUpColor,verticalLinesDnColor,verticalLinesStyle,verticalLinesWidth,_buff,_ind)
int OnInit()
{
// код доступен только после оплаты
}
void OnDeinit(const int reason)
{
string tlookFor = verticalLinesID+":";
int tlookForLength = StringLen(tlookFor);
for (int i=ObjectsTotal()-1; i>=0; i--)
{
string tobjectName = ObjectName(i);
if (StringSubstr(tobjectName,0,tlookForLength) == tlookFor) ObjectDelete(tobjectName);
}
}
int OnCalculate (const int rates_total,
const int prev_calculated,
const datetime& btime[],
const double& open[],
const double& high[],
const double& low[],
const double& close[],
const long& tick_volume[],
const long& volume[],
const int& spread[] )
{
// код доступен только после оплаты
}
#define _ptInstances 1
#define _ptInstancesSize 8
double _ptWork[][_ptInstances*_ptInstancesSize];
#define __range 0
#define __trend 1
#define __avgr 2
#define __avgd 3
#define __avgu 4
#define __minc 5
#define __maxc 6
#define __close 7
double iPrecisionTrend(double _high, double _low, douПоказано первые 50% кода (символов: 7111)