Coding help - page 32

 

...

"Ichimoku clouds bring no rain" - Lao Tzu

 

Dema crossover EMA condition 1HR Ichimoku

double post

 

Hi all

Im new in forex and have no clue in about coding.Im looking for indicator that displays range in pips from London open,or even better,of any selected starting and ending point during a day.I want to have that indicator on upper corner of my charts on all majors.It could be great if indicator shows green for the positive,red for negative pips.Can somebody create that indicator for me? Thanks.

 

...

Did you see the indicator at the first post of this thread : https://www.mql5.com/en/forum

It does almost to the letter what you described (with some extras), only it does it graphically (without displaying the high-low range as a number)

noriii:
Hi all Im new in forex and have no clue in about coding.Im looking for indicator that displays range in pips from London open,or even better,of any selected starting and ending point during a day.I want to have that indicator on upper corner of my charts on all majors.It could be great if indicator shows green for the positive,red for negative pips.Can somebody create that indicator for me? Thanks.
 
mladen:
Did you see the indicator at the first post of this thread : https://www.mql5.com/en/forum It does almost to the letter what you described (with some extras), only it does it graphically (without displaying the high-low range as a number)

Hi mladen.That is not what Im looking for.Im not interested in graphical display or high&low,just want to see distance in pips from the (session) open in upper corner of my chart.Thats all.Thanks.

 

Time definition in EA

hi all;

is there any possibilities write time for submit order before bar closed , for instance M15 chart that I am using , I would like to submit my order either after 14 min , or time = 14 min ,

thanks in advance

 

...

You can do something like this :

int passedTime = TimeCurrent()-Time[0];

It will return you a number of seconds passed from the beginning of the current bar and that way you can control it to number os desired seconds. Just be careful since if you, for example in your case, specify 899 seconds (14 minutes and 59 seconds) it is not guaranteed that you will receive a tick in that last second of the bar. You have to "give it some room" if you are looking for a time before the bar closes in order to make surre that tick actually arrives in that period

kemal44:
hi all;

is there any possibilities write time for submit order before bar closed , for instance M15 chart that I am using , I would like to submit my order either after 14 min , or time = 14 min ,

thanks in advance
 
mladen:
You can do something like this :
int passedTime = TimeCurrent()-Time[0];
It will return you a number of seconds passed from the beginning of the current bar and that way you can control it to number os desired seconds. Just be careful since if you, for example in your case, specify 899 seconds (14 minutes and 59 seconds) it is not guaranteed that you will receive a tick in that last second of the bar. You have to "give it some room" if you are looking for a time before the bar closes in order to make surre that tick actually arrives in that period

Thank you Mladen Really very good definition , the handicap for me , I wrote If( passedTime >10 && my signal==Ask) for submit order , It didnt work , the definition given by you is defined under start function

thank you for helping

 
kemal44:
Thank you Mladen Really very good definition , the handicap for me , I wrote If( passedTime >10 && my signal==Ask) for submit order , It didnt work , the definition given by you is defined under start function thank you for helping

Code is like that

if (Ask==iCustom(NULL,0,"Aband_Stop",0,0)&&iCustom(NULL,0,"Aband_Stop",0,0)>=iCustom(NULL,0,"ABand_v05",0,0))result1 = true; else result1 = false;

I would like to add time into that definition

 

Do it like this (place it at the beginning of the start)

int passedTime = TimeCurrent()-Time[0]; if (timePassed<840) return(0);

That way it (the EA) will ignore (not work) unless it has passed at least 14 minutes from the bar open. Only when at least 14 minutes from the beginning of the bar has passed it will enter the code after it and that is (as far as I understood) what you wanted to do

kemal44:
Thank you Mladen Really very good definition , the handicap for me , I wrote If( passedTime >10 && my signal==Ask) for submit order , It didnt work , the definition given by you is defined under start function thank you for helping
Reason: