Store signs

MQL4 스크립트

작업 종료됨

실행 시간 3 일
고객의 피드백
very professional and fast programmer. Recommended!!!!
피고용인의 피드백
Thanks for giving orders, a pleasure to work with the customer!!!

명시

Hello everyone. I wrote this simple code. I would like to know, if it is possible to store the signals that come out on the graph. If I close the MT4, when I open it again, I would find the old stored signals. I will not use the "for loop", because it rewrites the signals in the historic. Thanks, Max.


//--- indicator settings
#property indicator_chart_window
#property indicator_buffers 2

#property indicator_type1 DRAW_ARROW
#property indicator_width1 1
#property indicator_color1 Green

#property indicator_type2 DRAW_ARROW
#property indicator_width2 1
#property indicator_color2 Yellow


extern int Ritardo_Secondi=10;

datetime time_alert; //used when sending alert
//--- indicator buffers
double Buffer1[];
double Buffer2[];

int Period1=2;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {

   IndicatorBuffers(2);
   SetIndexBuffer(0,Buffer1);
   SetIndexEmptyValue(0,0);
   SetIndexArrow(0,108);
   SetIndexBuffer(1,Buffer2);
   SetIndexEmptyValue(1,0);
   SetIndexArrow(1,108);

   return(INIT_SUCCEEDED);
  }
//________________________________

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[])
  {
   int i=0;

   if(Buffer1[i]!=0)
     {
      Buffer1[i]=Low[i]-10*Point();
     }

   if(Buffer2[i]!=0)
     {
      Buffer2[i]=High[i]+10*Point();
     }

   static datetime BarStart=0;
   static bool check=false;
   if(BarStart!=Time[2]+Period()*120)
     {
      BarStart=Time[2]+Period()*120;
      check=true;
     }

   if(check && TimeCurrent()>=Time[2]+Period()*120+Ritardo_Secondi)
     {
      check=false;
      //Inserisci condizioni

      //Indicator Buffer 1
      if(iRSI(NULL,PERIOD_CURRENT,Period1,PRICE_CLOSE,0)<40

         )
        {
         Buffer1[0]=Low[0]-10*Point();
        }

      //Indicator Buffer 2
      if(iRSI(NULL,PERIOD_CURRENT,Period1,PRICE_CLOSE,0)>60

         )
        {
         Buffer2[0]=High[0]+10*Point();
        }

     }

   return(rates_total);
  }
//-----------------------------------------------------------------------------------------------------------------------------

If I close the MT4 at this time, when I open it again I have to find the same situation

Picture 1


and NOT one presented in picture 2

Picture 2




응답함

1
개발자 1
등급
(736)
프로젝트
1056
40%
중재
47
49% / 23%
기한 초과
84
8%
무료
2
개발자 2
등급
(103)
프로젝트
205
41%
중재
17
29% / 71%
기한 초과
45
22%
무료
3
개발자 3
등급
(39)
프로젝트
69
9%
중재
18
11% / 56%
기한 초과
18
26%
무료
4
개발자 4
등급
(1)
프로젝트
2
0%
중재
1
0% / 100%
기한 초과
0
무료
5
개발자 5
등급
(769)
프로젝트
1033
44%
중재
50
8% / 50%
기한 초과
117
11%
무료
6
개발자 6
등급
(71)
프로젝트
156
44%
중재
22
41% / 14%
기한 초과
16
10%
무료
7
개발자 7
등급
(91)
프로젝트
144
38%
중재
67
15% / 48%
기한 초과
55
38%
무료
비슷한 주문
I currently have a Forex trading script in .txt format that I want to be converted to a functional/working robot (in .mq4), without altering the strategy of the script. The strategy of the script is already in and shouldn't be changed unless with mutual understanding

프로젝트 정보

예산
10 - 15 USD
VAT (22%): 2.2 - 3.3 USD
총: 12.2 - 18.3 USD
개발자에게
9 - 13.5 USD
기한
에서 2  5 일