Oanda FIFO issue?

Posted By: Peeyotch

Oanda FIFO issue? - 08/22/19 14:23

I just started running the Z12 system this week using the Oanda API DLL under Zorro S and discovered some rejected trades this morning. Unfortunately I was an idiot and neglected to save the Zorro log, but the Oanda transaction history shows what happened. See attached screenshot of my transaction log.

I'm running with NFA off per the Oanda broker plugin docs, Hedging=5, Phantom=1, FXOnly=1 (being an American)

When I logged into Oanda web trading, I got a notification about FIFO rules and changes that went into effect only a few days ago. The gist of it is that all trades on the same instrument that have take-profit or stop-loss orders must be of a unique size to comply with FIFO rules. You can see in my screenshot that Zorro violated that rule. (Oanda's FIFO support page) Did I not configure something properly, or is this an entirely new thing that Oanda has done to make everyone's life more difficult?

Attached File
fifo.png  (18 downloads)
Posted By: jcl

Re: Oanda FIFO issue? - 08/22/19 16:44

The unique size is new to me. Since trades have normally no unique size, you must set the stop factor to zero for stepping around this rule.
Posted By: jrath

Re: Oanda FIFO issue? - 08/24/19 11:14

I was curious if Zorro needs updating for this Oanda FIFO change too. I have not seen any errors. I attach a few details.

Attached File
oanda.PNG  (14 downloads)
Posted By: AndrewAMD

Re: Oanda FIFO issue? - 08/24/19 12:10

Just add this to your script:

Code
StopFactor = StopPool = 0;


This will keep your stops and limits on the Zorro-side, thus meeting the FIFO requirements. No changes to Zorro required.

jcl: I see that the StopFactor issue was added to the documentation. I would also suggest StopPool = 0 also be added.
Posted By: Peeyotch

Re: Oanda FIFO issue? - 08/26/19 15:22

I would say that this appears to be a U.S. only change (of course). One of the FAQs on the page I linked is who this applies to, and it's only accounts within Oanda's U.S. division.
© 2019 lite-C Forums