TF-altProjekte/Indukatoren/I-Panel-StartStop/I-Panel-StartStop.mq5

85 lines
3.4 KiB
MQL5
Raw Permalink Normal View History

2025-05-30 16:31:33 +02:00
//+------------------------------------------------------------------+
//| I-Panel-StartStop.mq5 |
//| Thorsten Fischer Copyright 2019-2020 |
//| https://mql5.tfsystem.de |
//+------------------------------------------------------------------+
#property copyright "Thorsten Fischer Copyright 2019-2020"
#property link "https://mql5.tfsystem.de"
#property version "1.00"
#property indicator_separate_window
#property indicator_plots 0
//#property indicator_buffers 0
//#property indicator_minimum 0
//#property indicator_maximum 0
#include "PanelDialog.mqh"
//+------------------------------------------------------------------+
//| Global Variables |
//+------------------------------------------------------------------+
CPanelDialog ExtDialog;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//--- create application dialog
if(!ExtDialog.Create(0,"EA-Panel Start Stop",0,50,50,390,200))
return(INIT_FAILED);
//--- run application
if(!ExtDialog.Run())
return(INIT_FAILED);
//--- indicator buffers mapping
//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
//--- destroy application dialog
ExtDialog.Destroy(reason);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const int begin,
const double &price[])
{
//---
//--- return value of prev_calculated for next call
return(rates_total);
}
//+------------------------------------------------------------------+
//| 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[])
//{
////---
////--- return value of prev_calculated for next call
// return(rates_total);
//}
//+------------------------------------------------------------------+
//| ChartEvent function |
//+------------------------------------------------------------------+
void OnChartEvent(const int id,
const long &lparam,
const double &dparam,
const string &sparam)
{
ExtDialog.ChartEvent(id,lparam,dparam,sparam);
}
//+------------------------------------------------------------------+