Am I stupid or just missing something?

 

Hi!

I've had a few cases with an EA on a Demo acct with FXDD, running MT4, where the OrderSelect(...,...MODE_TRADES) still shows a trade as active several HOURS after it hit a stoploss. Does my EA have to do something to clear out that trade?

Thanks for the help and may the pips be with you!

DS

 

Hi dollarshort,

I am afraid I cant help you with your EA query as I am not a programmer of any sort. I would not however call myself 'stupid' because of that.

What I want to say is that I dont think you are stupid and if I may suggest, it is not necessary to refer to yourself as such. I suspect you are merely missing something.

I hope you succeed with your query as I, along with others, rely on the efforts of you progammers.

 

I don't think I'm stupid, either. I just used that to (hopefully) get attention to the question that I have. Thank you for the good words!

May the pips be with you!

DS

 
DollarShort:
Hi!

I've had a few cases with an EA on a Demo acct with FXDD, running MT4, where the OrderSelect(...,...MODE_TRADES) still shows a trade as active several HOURS after it hit a stoploss. Does my EA have to do something to clear out that trade?

Thanks for the help and may the pips be with you!

DS

seeing the EA would probably help. Not that I'll be able to solve the problem, but, hey, ya never know.

-ca

 

Do you have multiple examples of this, or just one?

I ask because I've seen my EAs skip a stop loss with InterbankFX. When I talked to their tech support they said it happens rarely and if it ever happened with real money they make it right.

If you have multiple examples, I'd say talk to your broker. If price ran through your stop loss it should get you out. Period.

Daniel

 

DollarShort

I've come accross the same thing. It doesnot have any thing to do with FXDD, Its with Meta Trader itself. I beleive if you set the termial history period to current session, it will change the results of the trade mode listings of closed trades in your current session. Other then that the orders will stay as currently active till the close of the trading session evern though there are closed out.

However when you write your EA your have no knowledge as to what setting someone will have their termial history setting on. I've used the orderprofit() function to test if the order was closed or still open instead of relying on the orderselects trade mode listings. Useing OrderSelect and testing if ordernumber's orderprofit is zero. If its still equals zero then it is still active if its non zero it has close either at a profit or loss. This works no matter what setting the termial history is set at.

Hope this makes sence. Like the Name by the way.

The CockeyedCowboy

DollarShort:
Hi!

I've had a few cases with an EA on a Demo acct with FXDD, running MT4, where the OrderSelect(...,...MODE_TRADES) still shows a trade as active several HOURS after it hit a stoploss. Does my EA have to do something to clear out that trade?

Thanks for the help and may the pips be with you!

DS
 

CockEyedCowboy:

Thanks for the method! I guess that I was just missing something. I'm curious about your name... Mine comes from two reasons:

1) "... a dollar short and a day late..." ---sums up my forex so far...

2) Obvious, going short on the US$....

DS

 
cockeyedcowboy:
DollarShort

I've come accross the same thing. It doesnot have any thing to do with FXDD, Its with Meta Trader itself. I beleive if you set the termial history period to current session, it will change the results of the trade mode listings of closed trades in your current session. Other then that the orders will stay as currently active till the close of the trading session evern though there are closed out.

Hello,

Would you mind explaining how to change this in MT4? I can't find the setting... Sorry if I'm being horribly dense!

Thanks,

-cubesteak

 

Thanks for this useful piece of info, cockeyedcowboy; it s the kind of "bug" one can spend hours on without finding what goes wrong.

 
DollarShort:
CockEyedCowboy:

Thanks for the method! I guess that I was just missing something. I'm curious about your name... Mine comes from two reasons:

1) "... a dollar short and a day late..." ---sums up my forex so far...

2) Obvious, going short on the US$....

DS

Got the name from a bar that I use to just about live at in Dallas Texas. Dont know if its still there.

Reason: