51 lines
1.6 KiB
MQL5
51 lines
1.6 KiB
MQL5
|
|
//+------------------------------------------------------------------+
|
||
|
|
//| Kurstrend.mq5 |
|
||
|
|
//| Copyright 2026, MetaQuotes Ltd. |
|
||
|
|
//| https://www.mql5.com |
|
||
|
|
//+------------------------------------------------------------------+
|
||
|
|
|
||
|
|
//--- input parameters
|
||
|
|
input int ATR;
|
||
|
|
input double Multiplier;
|
||
|
|
input int Applied;
|
||
|
|
|
||
|
|
//--- Headers
|
||
|
|
#include "../Kurstrend/Headers/Kurstrend.mqh"
|
||
|
|
|
||
|
|
//+------------------------------------------------------------------+
|
||
|
|
//| Custom indicator initialization function |
|
||
|
|
//+------------------------------------------------------------------+
|
||
|
|
|
||
|
|
int OnInit() {
|
||
|
|
//--- indicator buffers mapping
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
//---
|
||
|
|
return(INIT_SUCCEEDED);
|
||
|
|
}
|
||
|
|
|
||
|
|
//+------------------------------------------------------------------+
|
||
|
|
//| Custom indicator iteration function |
|
||
|
|
//+------------------------------------------------------------------+
|
||
|
|
|
||
|
|
int OnCalculate(const int32_t rates_total,
|
||
|
|
const int32_t 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 int32_t &spread[])
|
||
|
|
{
|
||
|
|
|
||
|
|
//---
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
//--- return value of prev_calculated for next call
|
||
|
|
return(rates_total);
|
||
|
|
}
|
||
|
|
//+------------------------------------------------------------------+
|