[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 194

 
Vinin:

Just as long as the TC holds out.

It's OK there - the martin is "soft"... :-))) lot increase ratio by Fibo numbers, it is possible to start with 1000$ on micro-real. I've already got a key at the start - after New Year, in January, I got a bit burned by aggressive adding (coefficients at turns - 5,4,3,2,2,2...) for the supposedly quickest way to the break-even, I "warmed up" now on demo... :-)))
 
Roman.:

It's OK there - the martin is "soft"... :-))) lot increase coefficient by Fibo numbers, it is possible to start with 1000 c.u. on microreal. I've already got a key at the start - after New Year in January, I've already got a bit burned by aggressive adding (coefficients at turns - 5,4,3,2,2,2...) for the supposedly quickest way to the break-even, I "warmed up" now on demo... :-)))

The author knows better
 
Vinin:

The author knows best.

TC, I'm sure, will hold out... There is no other way... And - before - the fact that the plum in January turned out in a flat - no questions about the use of orders, requotes, etc. on the real - no, ie, all beats - including a real and demo - account and tester, all checked myself ... Purely "problems" in entry/exit logic at MM on a martin... working on it.
 
Roman.:

The TC, I'm sure, will hold out... Otherwise - no way... And - earlier - that the plum in January turned out in a flat - no questions on the use of orders, requotes handling, etc., on the real - none at all, i.e., all beats - including a real and demo - account and tester, all checked myself ... Purely "problems" in entry/exit logic at MM on a martin... working on it.

Well, well...
 
Vinin:

Well, well...

Working, working, Victor, TC - description and code of "that" (previous) variant - here.
 
Roman.:

Working, working, Victor, TC - the description and code of "that" option is here.

I'm not interfering. Maybe something good will come of it.
 
Vinin:

I'm not in the way. Maybe something good will come of it.

I'm working.
 

Hello, I've been using the knowledge found on this forum for a long time, and it's worked fine for a while.

I have a question for the programmers:

How do I draw a vertical line in the future?

My script works the following way: first it draws 2 vertical lines on the chart, I set them to extrema and when I run the script again it draws the 3rd line in the future.

That is, when I check it a few days ago, ie far from the end of the graph, the 3rd line is drawn exactly as calculated, and when I analyze the current situation, and the calculations fall outside the graph, ie in the future, the line is drawn on the date 1970.01.01 00:00

Line drawing:

ObjectCreate("opa",OBJ_VLINE,0,0,0);
   ObjectSet("opa",OBJPROP_TIME1,Time[shift]);
   ObjectSet("opa",OBJPROP_COLOR,Blue);
   ObjectSet("opa", OBJPROP_WIDTH,3);
Calculating the bar shift first, could that be the problem?
 
NikuRR:

Hello,

How do I draw a vertical line in the future?

Look here ( future bar time ): future bar time site:mql4.com (search engine line)
 

Hi all!

Today I'm exercising with time) For example, I need to make an indicator do something at a certain time.

The code will be as follows:

int start()                           
  {
   double Time_Mes=21.30;
   
   int    Cur_Hour=Hour();             
   double Cur_Min =Minute();           
   double Cur_time=Cur_Hour + Cur_Min/100; 
   
   if (Cur_time==Time_Mes)             
   {
      // что-нибудь делаем
   }
                     
   return;                             
  }

Now, let's say we want our condition to work not only at 21.30, but also at 22.00, 22.30, 23.00, and so on...

You can, of course, do the following:

int start()                           
  {
   double Time_Mes_1=21.30;
   double Time_Mes_2=22.00;
   double Time_Mes_3=22.30;
   //ну и так далее...
   
   int    Cur_Hour=Hour();             
   double Cur_Min =Minute();           
   double Cur_time=Cur_Hour + Cur_Min/100; 
   
   if (Cur_time==Time_Mes_1 || Cur_time==Time_Mes_2 || Cur_time==Time_Mes_3 /*и т.д.*/)             
   {
      // что-нибудь делаем
   }
                     
   return;                             
  }

But I think it's somehow irrational, especially if there will be a lot of checkpoints. I think you can and simpler.

The question, how to make it easier (right) ?).

Thanks in advance, everyone!