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
deVries,
that is excellent. I see what you mean, that closed trades only have to be scanned in init.
Just a couple of points. If an OrderSelect fails, the code will exit the loop and will discontinue the checking.
I must admit, that I am pretty useless at error handling and often see in peoples code
if(OrderSelect() ) but usually this error is ignored and continues with the next order position. I really don't know what to do when OrderSelect() fails as I would be concerned that simply restarting the loop would repeat the failure and the program will be stuck.
That can't be good, but then again, exiting the loop or just using the data from the loop when OrderSelect() doesn't fail can't be particularly good either.
The other point
Unlikely, I know, but it is possible that at the same time that the EA is opening a trade a different trade is being closed.
That would mean that at the next tick, EATrades would still == OrdersTotal(), so opentimelastmarket would not be updated and another trade will be opened.
Would it be a good idea to check that the OrderSend is successful and if it is, then update opentimelastmarket there?
that is a point if you go further explaining how to do
it can be done checking with ticket = Ordersend(.... checking ticket >0
but you can also make EATrades a size you never will have after opening a trade and check next tick your Trades
i don't think someone will have so much trades open then EATrades != OrdersTotal()
that is a point if you go further explaining how to do
it can be done checking with ticket = Ordersend(.... checking ticket >0
but you can also make EATrades a size you never will have after opening a trade and check next tick your Trades
i don't think someone will have so much trades open then EATrades != OrdersTotal()
Then I don't see the point of having EATrades != OrdersTotal() as a condition if you make sure that it will always be true.
How about
Then I don't see the point of having EATrades != OrdersTotal() as a condition if you make sure that it will always be true.
How about
I use the orderloop also for trailing, setting sl,tp, and orderclose while i run the loop
a condition for checking opentrades is for me when the OrdersTotal() is changing
with placing
before the loop you can't do it inside this loop
Hello Everybody...
could someone help me ? I d like to add a feature on this EA.
Could it be possible to choose a particular day to trade... For example, On monday/tuesday/...
Hope tmy message is clear... :)
Hello Everybody...
could someone help me ? I d like to add a feature on this EA.
Could it be possible to choose a particular day to trade... For example, On monday/tuesday/...
Hope tmy message is clear... :)
Yes. You can check day using DayOfWeek() function.
Returns the current zero-based day of the week (0-Sunday,1,2,3,4,5,6) of the last known server time.
Hello Everybody...
could someone help me ? I d like to add a feature on this EA.
Could it be possible to choose a particular day to trade... For example, On monday/tuesday/...
Hope tmy message is clear... :)
make a simple bool function to check if it's ok to trade on a certain weekday
Thank you so much for your reply..
You know I dont know how to code... :(
could someone integrate this into the code ? I would be very thankful... :)
Have nice trades !!
:)