Take Profot Levels

Hi Jason.

I’m developing a software application that works alongside Meta Trader 4, and exchanges data back and forth. When my system attempts to place two trades through Meta Trader 4 on the same chart with the same Stop Loss, but different Take Profit levels, Meta Trader 4 independently adjusts the Take profit levels for both trades to the higher value, so I cannot effectively assign two target levels.

I have seen this behavior with other brokers as well, but not all (ie. Oanda).

Can you explain?

Thanks!

You need to identify the trades individually on the MetaTrader platform.

Thanks Jason, could you please elaborate on what you mean by identifying them individually? My application sends two trades to meta Trader. Each trade has the same entry price, stop loss and TP are initially not set. I also assign a unique Magic Number to each trade. Then, the application goes back and executes a Modify Trade for both positions. Now, I would assume that because each of the two trades have a different magic Number (and of course, natively different ticket number), that they are distinguishable from one another.

What am I missing here?

Thanks, I appreciate your help.

Hi Robert,

It was actually Master Tang who responded to your previous post, not me :18:

That said, I agree with his assessment. Something about the way your EA is sending orders seems to be in violation of FIFO (first-in, first-out) rules as set by the CFTC for all US traders.

When your application tries to execute a Modify Trader, you may be trying to attach stops to specific trade tickets instead of to your net position, which is not allowed according to FIFO. Or the application may be trying to close the newer trade first, which is also not allowed by FIFO. Our MT4 FAQ for US clients includes more information about FIFO regulations.

If you need help coding your strategy to make it FIFO compliant, you can reach out to our Programming Services department.