Hi professionals,
I just need to get one result per day
But the result changes with condition change through the day and expert restart so please advise. Thank you
Wait for a new day to start and get the previous day's result.
eyes:
Hi professionals,
I just need to get one result per day
But the result changes with condition change through the day and expert restart so please advise. Thank you
simply..
//+------------------------------------------------------------------+ //| ee.mq4 | //| Copyright 2021, HaskayaFx | //| https://www.haskayayazilim.net | //+------------------------------------------------------------------+ #property copyright "Copyright 2021, HaskayaFx" #property link "https://www.haskayayazilim.net" #property version "1.00" #property strict #property indicator_chart_window datetime prevtime; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- indicator buffers mapping //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| 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[]) { //--- if(iTime(Symbol(),PERIOD_D1,0) == prevtime) return(0); prevtime = iTime(Symbol(),PERIOD_D1,0); // Your Code.... //--- return value of prev_calculated for next call return(rates_total); } //+------------------------------------------------------------------+

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register