Oh so i can't do like that... I have to write every time? No others solutions to do a list? Maybe like a swith so?
A list which be edit by extern "" under MT4
Each time has to be stored in it's own variable . . . unless there is a relationship between the times that can be used to calculate the other times from the first . . . then you only need to hold one in a variable.
It's Kolier session indicator. As you see, there is 2 list of hours. The Indic use one hour of time start and one hour of time end to draw a line. i though that if i do same as it, my EA will extract one hour of the list and use it to read the price at the moment by a time Frame. The price will be used by "Ordersend" Where is my fault in the logic or in the code between mine and Kolier?
It's Kolier session indicator. As you see, there is 2 list of hours. The Indic use one hour of time start and one hour of time end to draw a line. i though that if i do same as it, my EA will extract one hour of the list and use it to read the price at the moment by a time Frame. The price will be used by "Ordersend" Where is my fault in the logic or in the code between mine and Kolier?
If you are going to use someone else's code then you first need to understand that code.
The critical difference between your code and the code you have just posted is this . . .
oh i don't know for the moment. i do another thing and nothing passed:
extern string TimeDayHighLow="12:43";
datetime Now= TimeCurrent(),
TDHL= StrToTime(TimeDayHighLow);
if (Now==TDHL)
{
//Buy conditionsif (O<H)// Si Open B0 < High B1 ou 2
{
OrderSend(Symbol(),OP_BUYSTOP,Lot,H,0,0,H+TP1,NULL,MagicHL,iTime(Symbol(), PERIOD_D1, 0 ) + (J*2*86395));
OrderSend(Symbol(),OP_BUYSTOP,Lot,H,0,0,H+TP2,NULL,MagicHL,iTime(Symbol(), PERIOD_D1, 0 ) + (J*2*86395));
//Sell conditions if (O>L)// Si Open B0 > Low B1 ou 2
{
OrderSend(Symbol(),OP_SELLSTOP,Lot,L,0,0,L-TP1,NULL,MagicHL,iTime(Symbol(), PERIOD_D1, 0 ) + (J*2*86395));
OrderSend(Symbol(),OP_SELLSTOP,Lot,L,0,0,L-TP2,NULL,MagicHL,iTime(Symbol(), PERIOD_D1, 0 ) + (J*2*86395));
It's working without times conditions but not with.
I want to learn how to code but nothing i create is working. Maybe use string values for time is not efficient, i don't know. What can i do ? I don't know too....
oh i don't know for the moment. i do another thing and nothing passed:
It's working without times conditions but not with.
I want to learn how to code but nothing i create is working. Maybe use string values for time is not efficient, i don't know. What can i do ? I don't know too....
If you don't have a tick exactly at 12:43:00 then the Buy and Sell conditions won't be checked . . . if you have a tick at 12:42:59 and the next at 12:43:02 then your Now time is never at 12:43
You advice me to use only the server time? So calculate the difference between Local and Current.
Yes, correct.
Ok tkanks again and again :) i will code this :)
I do what you tell me but nothing passed, my code is:
Is there an error?I do what you tell me but nothing passed, my code is:
Is there an error?Oh so i can't do like that... I have to write every time? No others solutions to do a list? Maybe like a swith so?
A list which be edit by extern "" under MT4
Oh so i can't do like that... I have to write every time? No others solutions to do a list? Maybe like a swith so?
A list which be edit by extern "" under MT4
ok ok. I was starting by this:
It's Kolier session indicator. As you see, there is 2 list of hours. The Indic use one hour of time start and one hour of time end to draw a line. i though that if i do same as it, my EA will extract one hour of the list and use it to read the price at the moment by a time Frame. The price will be used by "Ordersend" Where is my fault in the logic or in the code between mine and Kolier?ok ok. I was starting by this:
It's Kolier session indicator. As you see, there is 2 list of hours. The Indic use one hour of time start and one hour of time end to draw a line. i though that if i do same as it, my EA will extract one hour of the list and use it to read the price at the moment by a time Frame. The price will be used by "Ordersend" Where is my fault in the logic or in the code between mine and Kolier?If you are going to use someone else's code then you first need to understand that code.
The critical difference between your code and the code you have just posted is this . . .
. . . do you understand what it does ?
oh i don't know for the moment. i do another thing and nothing passed:
It's working without times conditions but not with.
I want to learn how to code but nothing i create is working. Maybe use string values for time is not efficient, i don't know. What can i do ? I don't know too....
oh i don't know for the moment. i do another thing and nothing passed:
It's working without times conditions but not with.
I want to learn how to code but nothing i create is working. Maybe use string values for time is not efficient, i don't know. What can i do ? I don't know too....