MQL4 v432

 

Why is it that my script function in older version....

And now my script does not function correctly in this latest update...

The problem I have found is that I cannot modify my orders anymore such as takeprofit or stoploss from my script.

If I change takeprofit or stoploss from MT4 manually, then it works...

If my script does the changing, then it does not work.

Tradecontextbusy is okay... Chart digit is normalize and okay...

EA is allowed to trade long and short and enable...

Therefore, can somebody review this new version and figure what is going on????

Thanks for your time reading and hopefully figure the problem...

NOTE: I know there is minimal requirement pip distance for SL with certain brokers... But that is not my problem because TP cannot be modify also...

 
Maybe your Broker no longer allows you to use an EA ?
 
RaptorUK:
Maybe your Broker no longer allows you to use an EA ?

OANDA is my broker... U think they are doing fishy business????
 
TradeWizard:

OANDA is my broker... U think they are doing fishy business????
Nope . . . it was a guess, I have nothing else to go on . . . you don't show any code so it's hard to tell what might be happening, does your code check return values ? What are Function return values ? How do I use them ? and report errors back to the logs ? have you checked the logs for errors ?
 

I want to modify SL and TP only.

TP and SL or normalized to digits of their specific chart.

Let's just say I want to modify TP only for simplicity sake.

OrderModify keeps returning a zero value.

Obviously, modification did not take place. Why? No log errors too.

 

I WENT TO CHECK GETLASTERROR FOR ORDERMODIFY.

I GOT ERROR# 4202 FOR MISSING OBJECT.

THIS IS RIDICULOUS. I MEAN, TICKET ID IS THERE.

HEY, I TEST IT IN STRATEGY TESTER. ORDERMODIFY WORKS ON TESTER...

THE TICKETID in TESTER is simple numbers....

I NOTICE THAT OANDA has TICKET ID for MT4 and then FX TRADE ID also.

HOW DO I GOT ABOUT USING THE RIGHT ID????

 
TradeWizard:

OrderModify keeps returning a zero value.

Obviously, modification did not take place. Why? No log errors too.

OrderModify() returns a bool . . did you read the documentation ?
 
TradeWizard:

I WENT TO CHECK GETLASTERROR FOR ORDERMODIFY.

I GOT ERROR# 4202 FOR MISSING OBJECT.

4202 is not an error relating to your OrderModify() . . perhaps you should show some of your code.
 
RaptorUK:
OrderModify() returns a bool . . did you read the documentation ?


Dude, don't just comment like a smartass.

Read my question first.

OrderModify keeps returning a zero value.

Obviously, modification did not take place. Why? No log errors too.

I WENT TO CHECK GETLASTERROR FOR ORDERMODIFY.

I GOT ERROR# 4202 FOR MISSING OBJECT.

Ordermodify fail with a 0. I had to check getlasterror. Either way, I said my stuff works in the strategy tester

but not live because OANDA is somehow not using the MT4 orderid ticket. DOES anybody know?

 
Show some code. We cannot help by guessing
 
TradeWizard:


Dude, don't just comment like a smartass.

If you don't want help just say so . . .