Coding help - page 51

 

If you follow the steps correctly and you prevent that the file is opened (by any instance of code or some other program) at a moment when you try to delete it, it must work. Those are the functions that are in the core of windows (they do not have anything to do with metatrader) and they work

sunshineh:
Hi,

lot's of thanks for your code-snippet!!!

It works also on my laptop, but when I want to change the time, so that the indicator has to create, write and delete a few times per minute (3x), it doesn't work anymore :-(

So I think I have to overwrite my old entries each time...
 

Try it out now. Added a "JustLLastDay" option so you can chose if it workd the "old" way or draws a line just for the last day

Andrewsurfer:
time_vlines.mq4 Anyone? Please.
Files:
 

It is not difficult at all to make an indicator alert at certain time (+ some allowed threshold time for an eventual lack of ticks), but what would it alert of?

Jonny473:
Hi Mladen (and others), do you know of a price alert indicator that only checks price at a certain time?
 
mladen:
It is not difficult at all to make an indicator alert at certain time (+ some allowed threshold time for an eventual lack of ticks), but what would it alert of?

Hi Mladen,

thanks for the quick reply, the price alert indicator would only check price at a certain time...if the 1HR candle closes above/under xxx price level for example, it alets me, all the noise within this 1HR candle before does not bother me...

 
mladen:
Try it out now. Added a "JustLLastDay" option so you can chose if it workd the "old" way or draws a line just for the last day

Thanks a lot

 

I got zero divide when add custom indicator to chart.

I think problem from MA01 and MA02 variables have 0 value.

How this happen? any code guru help me.

limit=Bars-counted_bars;

for(i=0; i<limit-1; i++)

{

MA01 = iMAOnArray(buffer2,Bars,Period,0,MODE_EMA,i);

MA02 = iMAOnArray(buffer2,Bars,Period,0,MODE_EMA,i+1);

Buffer1 = 2*(MA01-MA02)/(MA01+MA02);

}
 

Just found soltion.

Ok, just found the solution to fix my problem on this forum.

 
Jonny473:
Hi Mladen, thanks for the quick reply, the price alert indicator would only check price at a certain time...if the 1HR candle closes above/under xxx price level for example, it alets me, all the noise within this 1HR candle before does not bother me...

hi, did you find it? which version line alert functions like this?

 
zigflip:
hi, did you find it? which version line alert functions like this?

its here: #35

via hand trend line, which can draw as horizontal...

 

Thanks alot, will check it out and talk to you soon!

Reason: