[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 585

 
Use ObjectCreate() and ObjectSet()
 

Good afternoon, everyone. Can you please advise an inexperienced user? I use the indicator "123" and I really like the way it draws levels. I have never tried it before, I have never tried it before. The problem is: I have inserted the indicator into the chart and it has drawn levels but ten minutes later the price rebounded by 70 points and the levels have not changed. I have to disable and re-enable the indicator each time the price moves and it keeps drawing new levels. Please, advise if you may introduce some parameters into the indicator's program so it should disable and re-enable every ten minutes with already updated levels. I'm not good at programming, so please explain if and how it can be done. Thank you all in advance.


Files:
123.mq4  15 kb
 

Is there-designed ishimoku an indicator for professionals?)

I guess since the "developer" never finished his indicator, it was of little use:)

 
alsu:

Is the re-designed ishimoku an indicator for professionals?)

I guess since the "developer" never finished his indicator, it was of little use:)


So you think that there is no way to automate this indicator? I know it's not a super cool indicator, but I like levels it draws. I am wondering if it is possible to add some function so that it may update levels automatically.
 
alsu:
Use ObjectCreate() and ObjectSet()

Draws arrows, but on every bar, when necessary only when the first candle has been broken.

https://www.mql5.com/ru/forum/111497/page583

.

 
mazan:

So you think it is impossible to automate this indicator? I know it is not a super-duper indicator but I like levels it draws and I am good at working with them but the issue is that I occasionally need to refresh levels manually. I am wondering if it is possible to add some function so that it may update levels automatically.

here's the corrected one. Levels are updated on every tick.


And even now deletes its own objects when the indicator itself is removed from the chart. "Developer" fi.

Files:
123_1.mq4  16 kb
 
gince:

It draws arrows, but on every bar, when necessary only when the first candle is broken.

https://www.mql5.com/ru/forum/111497/page583

.

It is necessary to analyse only the formed bars, because on the zero High and Low are constantly updated.

Try to count not for(shift=0; ..., but for(shift=1;..., then there will be no recalculation on the zero bar. And shift the analyzed bars from 0,1,2 to 1,2,3.

 
alsu:

You should analyze only the formed bars, because High and Low are constantly updated on the zero bar.

Try to count not for(shift=0; ..., but for(shift=1;..., then on the zero bar no recalculations occur. Reverse the analyzed bars from 0,1,2 to 1,2,3.

Sorry, I didn't get it.

Your conditions are messed up. This is up:

      if (d1_h1 < d1_h2 && d1_l1 > d1_l2  && d1_l1 > d1_l0) 

and it should be

      if (d1_h1 < d1_h2 && d1_l1 > d1_l2  && d1_h1 < d1_h0) 
and the same with the down arrow
 
alsu:

here's the fix. Levels are updated on every tick.


And even now deletes its own objects when the indicator itself is removed from the chart. "Developer" fi.


Thanks infinitely, put it in the chart, everything works, thanks again. A pro is a pro. Respect!
 

Good afternoon, trying to figure out how to write an EA. I took the EA template from the article on mql4 website, added my own conditions to understand the debugging and functionality, and entered conditions for opening positions:

        MyATR = ((High[0] - Low[0])/Low[0]);
	 BT = Open[0] + Open[0]*iMAOnArray(MyATR ,0,PerB,0,MODE_SMA,1);
        ST = Open[0] - Open[0]*iMAOnArray((MyATR ,0,PerS,0,MODE_SMA,1);

   if (Ask >=  BT)                       // Если разница между
     {                                          // 
      Opn_B=true;                               // Критерий откр. Buy
      Cls_S=true;                               // Критерий закр. Sell
     }
   if (Bid <= ST)                       // Если разница между
     {                                          // 
      Opn_S=true;                               // Критерий откр. Sell
      Cls_B=true;                               // Критерий закр. Buy
     }

I've added my own conditions (or changed existing ones) so that the orders are executed once.

Reason: