[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 80
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
Thanks, I did it with Close and as you advised:
but the result is updated only when a new bar appears and I want to see and record changes on every tick.
If the EA is not looped, the result will change on every tick
Thank you all, separately everything works:
But the main code only counts on bar closure, I'll look into it.
If the EA is not looped, the result will change on every tick
MODE_TRADES - order is selected among open and pending orders,
MODE_HISTORY - order is selected among closed and deleted orders.
- Am I correct to understand that MODE_TRADES is used only with OrdersTotal(), and MODE_HISTORY - only with OrdersHistoryTotal()?
- If so, why are they needed at all?
Thank you!
There are two options in OrderSelect():
MODE_TRADES - order is selected among open and pending orders,
MODE_HISTORY - order is selected among closed and deleted orders.
- Am I correct to understand that MODE_TRADES is used only with OrdersTotal(), and MODE_HISTORY - only with OrdersHistoryTotal()?
- If so, why are they needed at all?
Thank you!
You understand correctly.
Your second question is not clear. If you select an order by its position, you need to know the total number of orders
You understand correctly.
Your second question is not clear. If you select an order by its position, you need to know the total number of orders
It's not a matter of principle, the main thing for me was the answer to the first question.
Thank you!
alsu, open buy if price has risen more than 20 pips in the last 10 minutes; open sell if price has fallen more than 20 pips in the last 10 minutes.
And if it's not a problem: Open buy if the current price is by some more than the previous bar's maximum, open sell if the current price is by some less than the previous bar's minimum.
P.S. The code to open buy and sell is already in the board, so I don't need to describe them... I'm more interested in how to correctly write the opening conditions described above...
alsu, open buy if price has risen more than 20 pips in the last 10 minutes; open sell if price has fallen more than 20 pips in the last 10 minutes.
And if it's not too much trouble, one more problem: Open buy if the current price is a bit higher than the high of the previous bar, open sell if the current price is a bit lower than the low of the previous bar.
alsu, exactly when crossing, check the time and if it falls within the time range make a trade.
Thank you. Going to try it now.
alsu, exactly when you cross, check the time and if it falls in the time range make a trade.
In such a variant, you have to remember the tick history for the last 10 minutes... the code is not trivial