My EA works with pending orders. Is it possible to set a condition for any pending order so that the actual buy/sell order is only activated (by price) when this condition is met?
For example, by the time the pending order is about to be activated by price movement the MACD/CCI/etc. should be between/over/under a certain value, otherwise the buy/sell should not be activated.
If I understand what you are asking for . . . . there is a simple answer but you won't like it . . .
Don't place the order until the second condition is also met . . .
If I understand what you are asking for . . . . there is a simple answer but you won't like it . . .
Don't place the order until the second condition is also met . . .
You are right! I don't like it! :-) How do I wait for the price to reach a specific level before I place the order if not by pending order? Remember this is an EA and I cannot place orders manually.
OK, off the top of my head, see if this makes sense . . .
Pending order currently set when Condition(s)1 is true . . . so in future set the Pending order when Condition(s)1 is true and Condition(s)2 (mentioned above in your post) is also true. If the problem with doing this is that Condition(s)1 have change by the time Condition(s)2 are true then you need a variable to remember the state of Condition(s)1 . . .
So place Pending order if . . . (Conditions1State == true) && (Condition(s)1 == true) . . does that make sense ?
OK, off the top of my head, see if this makes sense . . .
Pending order currently set when Condition(s)1 is true . . . so in future set the Pending order when Condition(s)1 is true and Condition(s)2 (mentioned above in your post) is also true. If the problem with doing this is that Condition(s)1 have change by the time Condition(s)2 are true then you need a variable to remember the state of Condition(s)1 . . .
So place Pending order if . . . (Conditions1State == true) && (Condition(s)1 == true) . . does that make sense ?
I am not sure if I get it. If I add the conditions which I want to apply to the buy/sell order to my pending order which pending order must be activated when the price reaches the pending order's buy/sell price then my pending orders will not be placed since the conditions required for the buy/sell orders will most likely not be true at the time of placing the pending orders. The conditions apply only to the time when the pending order must become a buy/sell order.
Am I missing something?
I guess what I am saying is have a virtual pending order (kept track of by setting variables) then when the conditions are correct for the virtual pending order to become an actual buy/sell then set a buy/sell order . .
I think I understand. I suspect this will test my meager programming skills!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
My EA works with pending orders. Is it possible to set a condition for any pending order so that the actual buy/sell order is only activated (by price) when this condition is met?
For example, by the time the pending order is about to be activated by price movement the MACD/CCI/etc. should be between/over/under a certain value, otherwise the buy/sell should not be activated.
Looking forward to hear from you.