время свечи вот:
input int iHour = 23;
input int iMinute = 30;
input int iHour = 23;
input int iMinute = 30;
что-то никак не получается
extern string ZoneType = "Verified"; // Untested, Weak
extern bool ProBoy = 1; // 0-отбой
Хочу попробовать идею на разных таймфреймах
Иначе происходит путаница в уровнях, когда ставишь уровень на евро доллар, он отображается на евро франке.
if(nm!="" && ChartSymbol(curr)==sm)
//+------------------------------------------------------------------+
//| Candle.mq4 |
//| Copyright 2020, AM2 |
//| http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, AM2"
#property link "http://www.forexsystems.biz"
#property version "1.00"
#property strict
#property indicator_chart_window
input string Start = "1.05.2020";
input string Stop = "1.04.2020";
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//--- indicator buffers mapping
Comment("");
//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
Comment("");
}
//+------------------------------------------------------------------+
//| 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[])
{
//---
int bulls=0;
int bears=0;
int begin=iBarShift("",0,StringToTime(Start));
int end=iBarShift("",0,StringToTime(Stop));
for(int i=begin; i<end; i++)
{
if(close[i]-open[i]>0)
{
bulls++;
}
if(close[i]-open[i]<0)
{
bears++;
}
}
Comment("\n Bulls: ",bulls,
"\n Bears: ",bears);
//--- return value of prev_calculated for next call
return(rates_total);
}
//+------------------------------------------------------------------+
на скрине диапазон: с 01.02 до 01.05
AM2