Hi Pit!
Die Print-Funktion gibt im 'Terminal' im Tab 'Experten' aus.
Ich hab das MiniProg auf Indikator für MT4 umgebaut:
Code:
//+------------------------------------------------------------------+
//| TickSpeedometer.mq4 |
//| Copyright © 2016 Ing. Otto Pauser |
//| |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2016 Ing. Otto Pauser"
#property link ""
#property version "1.00"
#property description "Misst die Ticks pro angegebener Zeiteinheit"
#property strict
#property indicator_chart_window
input int Sekunden = 1; // Zeitintervall in Sekunden
int interval,count; // Variablenname time ist nicht möglich
int OnInit()
{
interval=Sekunden; // Sekunden kann nicht verändert werden
if (interval<1) // kleiner check
interval=1;
EventSetTimer(interval);
count=0;
return(INIT_SUCCEEDED);
}
void OnDeinit(const int reason)
{
EventKillTimer();
}
int OnCalculate (const int rates_total, // size of input time series
const int prev_calculated, // bars handled in previous call
const datetime& time[], // Time
const double& open[], // Open
const double& high[], // High
const double& low[], // Low
const double& close[], // Close
const long& tick_volume[], // Tick Volume
const long& volume[], // Real Volume
const int& spread[]) // Spread
{
count++;
return(rates_total);
}
void OnTimer()
{
Comment("Ticks pro ", interval, " Sekunde", interval>1?"n":"", ": ", count); // gibt links oben die Meldung aus
count=0; // reset counter
}
LG Otto