Hello everyone, I've been trying to create a code to count candles from the last pending order, so that after x candles of the pending order, it automatically cancels.
However, I didn't get to the calculation, could someone give me a tip?
- Count pending orders in a period MQL5
- NEED HELP TO CREATE PENDING ORDER
- How to count number of pending order opened in MT5
- Usually people who cannot code do not receive free help on this forum, although it could happen if you are lucky. Be patient.
- If you show your attempts and describe your problem clearly, you will most probably receive an answer from the community.
- If you do not want to learn to code, that is not a problem. You can either look at the Codebase if something free already exists, or in the Market for paid products (also sometimes free).
- Finally, you also have the option to hire a programmer in the Freelance section.
Fernando Carreiro #:
- Usually people who cannot code do not receive free help on this forum, although it could happen if you are lucky. Be patient.
- If you show your attempts and describe your problem clearly, you will most probably receive an answer from the community.
- If you do not want to learn to code, that is not a problem. You can either look at the Codebase if something free already exists, or in the Market for paid products (also sometimes free).
- Finally, you also have the option to hire a programmer in the Freelance section.
Yes, thanks, i really cannot code but i learning actually. That is the reason for my question.
And, i think that my description is very clearly and i don't have a code, because all my tryes do not plays, but thank so much.
I believe that don't understood the proposite of this forum, i'm so sorry.
w.s.g:
Hello everyone, I've been trying to create a code to count candles from the last pending order, so that after x candles of the pending order, it automatically cancels.
However, I didn't get to the calculation, could someone give me a tip?
1. First add a checkmark when your pending order is triggered, e.g.
bool executed =true; // Find candle where order executed int shift = iBarShift(NULL,0,iTime(NULL,0,1));
then start counting
int candle = 5; // lets say you want to exit at 5th candle from when order is executed
then run a for loop as per your requirement to close order
w.s.g:
Hello everyone, I've been trying to create a code to count candles from the last pending order, so that after x candles of the pending order, it automatically cancels.
However, I didn't get to the calculation, could someone give me a tip?
Why not set expiration date?
datetime expiry=TimeCurrent()+bars_count*PeriodSeconds();
w.s.g #:
Thanks you, i got it!
Could you please post your code here so I can see how you coded this solution? I´m trying to learn it´d be very helpfulCould you please post your code here so I can see how you coded this solution?
I´m trying to learn and it would be really helpful for my general understanding
Thanks a lot.
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