You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
First loop through the orders and find which one has the latest OrderOpenTime().
That is the only order that you are interested in.
thank you my friend for your reply
but still I can not figure it out
I mean we need to go through order select
then choose the last order with OrdersTotoal ( ) -1
then we get the information we need such as OrderOpenTime ( )
that is the only way my mind is set to :)
is there another way ?
please if it does not take a lot of your time I appreciate it if you elaborate .
Don't assume that the latest order is at the index OrdersTotal()-1.
I have deleted your new topic.
The subject is very similar to what is being discussed here so no need for a new topic.
Adapt the above code to fit your requirements.
Don't assume that the latest order is at the index OrdersTotal()-1.
I have deleted your new topic.
The subject is very similar to what is being discussed here so no need for a new topic.
Adapt the above code to fit your requirements.
thank you my dear friend you've been a great help to me . may god bless you with happiness :)
regarding my last topic that got deleted , if it's not taking your time can you help me with that too ?
I promise when become a pro such as you , I would help a rookie like me :)
the GOAL is to get these line of code for SPECIFIC chart like CHFJPY
because these line of codes is for all orders form all chart
p.s : I have used " if( OrderSymbol( ) == Symbol ( ) ) " but it did not work
p.s : I have used " if( OrderSymbol( ) == Symbol ( ) ) " but it did not work
Yes, it will work.
Think about it and insert it into the code that I showed you.
Yes, it will work.
Think about it and insert it into the code that I showed you.
of course my good friend
thank you for being a bright light to my dark path
I will try it as you said
either we find a way or we make one :)
thanks for every thing
Not a valid argument
X cannot be greater than X+360
Think about it
If x=100
Can 100 be greater than 460?
Not a valid argument
X cannot be greater than X+360
Think about it
If x=100
Can 100 be greater than 460?
I know as I mentioned it is a false equation
but you know my purpose is this :
when we do : int X = TimeCurrent () - OrderOpenTime()
x is a number like 9000
and with every tick that comes X get increased too like 9001
is there a way to save that value 9000 to stay still and frozen at 9000 and then we compare renewed value of X ( which gets renewed with every tick ) that X be greater than 9000+360 ?
all lines above serves the purpose of telling ea to wait 360 second form last order open time so that you can enter another trade
Save the value in a globally scoped variable or in a locally scoped static variable. Both variable types will keep the value saved between OnTick() events.
Globally scoped variables are defined outside all functions, usually at the start of the MQL file, while locally scoped static variables are defined inside a function but with the keyword "static" in front of it.