How to correct " possible loss of data due to type conversion "

 
//+------------------------------------------------------------------+
//|                                                  EA_TrialM15.mq4 |
//|                                                             Test |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Test"
#property link      ""
#property version   "1.00"
#property strict
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+

double    DaMi[2,10];

int OnInit()
  {
//--- create timer
   //EventSetTimer(60);
   
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//--- destroy timer
   EventKillTimer();
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   DaMi[0,0] = Time[1];DaMi[0,1] = High[1];DaMi[0,2] = Low[1];
  }
//+------------------------------------------------------------------+
//| Timer function                                                   |
//+------------------------------------------------------------------+
void OnTimer()
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Tester function                                                  |
//+------------------------------------------------------------------+
double OnTester()
  {
//---
   double ret=0.0;
//---

//---
   return(ret);
  }
//+------------------------------------------------------------------+
//| ChartEvent function                                              |
//+------------------------------------------------------------------+
void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
  {
//---
   
  }
//+------------------------------------------------------------------+

Compile result : possible loss of data due to type conversion

Time[1] = datetime , High[1] & Low[1] = double

Documentation on MQL5: Language Basics / Data Types / Typecasting
Documentation on MQL5: Language Basics / Data Types / Typecasting
  • www.mql5.com
Typecasting - Data Types - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Cast the datetime to the double.
 
William Roeder:
Cast the datetime to the double.

double   GetTime;

GetTime = Time[1];

Compile result : possible loss of data due to type conversion
Documentation on MQL5: Language Basics / Data Types / Typecasting
Documentation on MQL5: Language Basics / Data Types / Typecasting
  • www.mql5.com
Typecasting - Data Types - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Sit2020: Compile result : possible loss of data due to type conversion

Of course. Now go back and re-read #1. Your question was answered. Stop asking.

 
William Roeder:

Of course. Now go back and re-read #1. Your question was answered. Stop asking.

Oh! Sorrry . My language not good.

My question is how to use 1 type array ( Dami[2,10] ) with 2 data type such as datetime & double.

Reason: