Maximum number of order
-
Hi, i did not understand... where i will to modify the variable counto to 0?
-
Hello, I need some help here.
I have tried to create an EA and I want to make the EA able to input maximum number of order.
For example, I am using a Moving Average crossover and I want to make when the crossover happen, I want to enter 10 maximum number of order after the rule is fulfilled.
I only know how to use once per bar block and if i do not put the block, the order keep on stacking until my margin is not enough.Thank you.
-
I worked situations like this with a variable. Like this:
When the crossover happens, modify variable Count to 0, just to erase the old count.
Then proceed your block tree to the order creation, and after order, modify variable Count to Count+1.
Simple as that, now you just add condition block (Count < max order number) to restrict further orders. -
Thank you.
Definitely gonna try that out.
-
Please create a new thread with your specific issue.