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
Just i need a little help then everything will be ok.( I need to know the lastest order for buy, the lastest order for sell and the previous order for whatever buy or sell )
many thanks for you.
guys,
would you have a look and tell me what is the wrong.
i need create some functions for:
1- function to get and keep the last order open price for buy.
2- function to get and keep the last order open price for sell.
3- function to get and keep the last close order whatover buy or sell
then i will put if ((LastOpenTicketForBuy()+LastOpenTi cketForSell())/2)<MarketInfo("EURUSD",MODE_BID)Clo se t he position
Do you mean i should
1- put double LastOpenForBuy() instead int
2-put double orderforbuy then return( orderforbuy )
by this way i can got last order opened for buy only.
Do you mean i should
It's a question . . . I don't mean anything other than . . . what is your answer ?
If you want me to help, you need to answer my question . . . and "I do not know" is not an acceptable answer. Think about it a little.
In your opinion . . what does return(lastTicket); do ?
Returns ticket number for the currently selected order.
Thanks WHRoeder,
For your real help. if i need to get the last order for buy and the last order for sell then compare them by doing :
if ( the last orderopenforbuy == OOTlastest )
{ do something }
else
{ } ....... is the below code will work.
does this really work???
first loop
goes into second
pos decremental down to zero. second loop ends --> jumps back to first, and first loop does not know where pos had left since the last time. chances are, pos = zero.
this code may possibly work... just need to change one 1 thing:
the second for statement
to a different iterator like
and likewise, replace pos to the new iterator (in this case, a) in all of second loop logic ONLY.
In your opinion . . what does return(lastTicket); do ?
Returns ticket number for the currently selected order.
You said . . .
"i need create some functions for:1- function to get and keep the last order open price for buy.
2- function to get and keep the last order open price for sell.
3- function to get and keep the last close order whatover buy or sell "
So why are you returning the ticket number ? Read the code you are copying and pasting, understand it, learn . . .