First commit [09/03/2018]
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
//+------------------------------------------------------------------+
|
||||
//| SimplePanel.mq5 |
|
||||
//| Copyright 2009-2017, MetaQuotes Software Corp. |
|
||||
//| http://www.mql5.com |
|
||||
//+------------------------------------------------------------------+
|
||||
#property copyright "Copyright 2009-2017, MetaQuotes Software Corp."
|
||||
#property link "http://www.mql5.com"
|
||||
#property version "1.00"
|
||||
#property indicator_separate_window
|
||||
#property indicator_plots 0
|
||||
#property indicator_buffers 0
|
||||
#property indicator_minimum 0.0
|
||||
#property indicator_maximum 0.0
|
||||
#include "PanelDialog.mqh"
|
||||
//+------------------------------------------------------------------+
|
||||
//| Global Variables |
|
||||
//+------------------------------------------------------------------+
|
||||
CPanelDialog ExtDialog;
|
||||
//+------------------------------------------------------------------+
|
||||
//| Custom indicator initialization function |
|
||||
//+------------------------------------------------------------------+
|
||||
int OnInit(void)
|
||||
{
|
||||
//--- create application dialog
|
||||
if(!ExtDialog.Create(0,"Simple Panel",0,50,50,390,200))
|
||||
return(INIT_FAILED);
|
||||
//--- run application
|
||||
if(!ExtDialog.Run())
|
||||
return(INIT_FAILED);
|
||||
//--- succeed
|
||||
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);
|
||||
}
|
||||
//+------------------------------------------------------------------+
|
||||
//| ChartEvent function |
|
||||
//+------------------------------------------------------------------+
|
||||
void OnChartEvent(const int id,
|
||||
const long &lparam,
|
||||
const double &dparam,
|
||||
const string &sparam)
|
||||
{
|
||||
ExtDialog.ChartEvent(id,lparam,dparam,sparam);
|
||||
}
|
||||
//+------------------------------------------------------------------+
|
||||
Reference in New Issue
Block a user