Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 730 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484786
12/09/21 12:45
12/09/21 12:45
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Oanda cannot update the Oanda plugin, nor would that help with a wrong lot amount. They must update the lot amount in their API.

If it only happens with a direct connection, that would explain why some people have that problem and others not. We'll check if we get also the wrong lot amount here, and will then contact Oanda for solving the problem. Please stay tuned.

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484793
12/10/21 09:34
12/10/21 09:34
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Ok, it seems that the problem is more complicated. The lot amount was in fact correct, but the the order units were changed from lots to contracts. Therefore the too large size,.

Please download a new Oanda plugin here: https://opserver.de/down/Oanda.zip

Please let me know if the problem still happens with that plugin.

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484818
12/12/21 11:00
12/12/21 11:00
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
I will re-start the TS next January and report any issues will arise. Will the new plugin be included in the 2.44 upcoming release. Will it be "compatible" with the new Oanda Asset list just announced with the same version?

Thank you

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484824
12/13/21 07:41
12/13/21 07:41
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline
Member
MegaTanker  Offline
Member
M

Joined: Aug 2021
Posts: 101
Looks good, just saw my script opened 1 Lot which now is 0.1 contracts on Oanda.

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484826
12/14/21 03:19
12/14/21 03:19
Joined: Sep 2020
Posts: 15
Toronto, Canada
J
JayWilly Offline OP
Newbie
JayWilly  Offline OP
Newbie
J

Joined: Sep 2020
Posts: 15
Toronto, Canada
Thanks for the fix JCL. I can confirm that it rectifies the issue for Index CFDs but there is now an issue with the FX amounts.

The fix is impacting the order sizes for FX transactions. An example is an order for 10,000 Lots of USDCAD, where 1 Lot = 1, is now only transacting 1,000 USDCAD, 10 times less. The fix seems to have been applied across all products traded on Oanda rather than only the Index CFDs.

This is having unintended consequences with open positions which flips directions, close out long and then go short for example. Zorro now thinks my outstanding position sizes are 10 times smaller. Close orders are less than the actual open positions which are then followed by an order to open a new position in the opposite direction which results in Error 75 because my original position was never completely closed.

Can you have a look at the fix with the Oanda plugin and address this situation?

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484827
12/14/21 12:56
12/14/21 12:56
Joined: Sep 2020
Posts: 15
Toronto, Canada
J
JayWilly Offline OP
Newbie
JayWilly  Offline OP
Newbie
J

Joined: Sep 2020
Posts: 15
Toronto, Canada
Now also getting another error message from Oanda:

"market_order_reject","rejectreason":"units_precision_exceeded","instrument":"eur_nok","timeinforce":"fok","positionfill":"reduce_only","reason":"trade_close","tradeclose":{"units":"5045.900000","tradeid":"464"}},"relatedtransactionids":["623"],"lasttransactionid":"623","errormessage":"the units specified contain more precision than is allowed for the order's instrument","errorcode":"units_precision_exceeded"}
Error 075 [EUR/NOK:Trend:S00464] - close attempt 2, 50459@10.27 at 10:00:02

Decimal places not permitted for currency orders. Decimals only permitted for Index CFD because of the change earlier this year to lower minimums.

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484828
12/14/21 13:02
12/14/21 13:02
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I'm not getting that problem here, so let's find out what it is.

- Make sure that you have the latest Zorro version 2.44.4, the release candidate.
- Select your Oanda demo account and run the TradeTest script. Open and close some positions. If the problem then still happens, please post the log.
- If the problem only happens with your script, but not with TradeTest, please contact Support. They will then look into your script and try to reproduce the problem.

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484832
12/14/21 15:30
12/14/21 15:30
Joined: Sep 2020
Posts: 15
Toronto, Canada
J
JayWilly Offline OP
Newbie
JayWilly  Offline OP
Newbie
J

Joined: Sep 2020
Posts: 15
Toronto, Canada
I upgraded to the latest version 2.44.4 and ran the TradeTest script. All tests out fine.

Now running my script. Will see what happens.

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484841
12/15/21 14:15
12/15/21 14:15
Joined: Sep 2020
Posts: 15
Toronto, Canada
J
JayWilly Offline OP
Newbie
JayWilly  Offline OP
Newbie
J

Joined: Sep 2020
Posts: 15
Toronto, Canada
I can confirm that everything is finally working as should be now. The updated Oanda plugin was conflicting with the older Zorro version 2.30.

Thanks for all your help jcl!

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484871
12/21/21 18:49
12/21/21 18:49
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline
Member
MegaTanker  Offline
Member
M

Joined: Aug 2021
Posts: 101
I thought the issue was resolved but maybe it isn't?
With the new Oanda.dll, I reset the z12 instance I have running after getting the same error JayWilly reports above "the units specified contain more precision than is allowed for the order's instrument". I closed all trades and restarted everything, assuming this was happening with trades that were opened with the old plugin. But now it's happening with trades that were opened with the new plugin, too...

Code
!close: {"orderrejecttransaction":{"id":"x","accountid":"x","userid":x,"batchid":"x","requestid":"x","time":"2021-12-21t16:11:24.943373510z","type":"market_order_reject","rejectreason":"units_precision_exceeded","instrument":"gbp_usd","timeinforce":"fok","positionfill":"reduce_only","reason":"trade_close","tradeclose":{"units":"91.100000","tradeid":"478"}},"relatedtransactionids":["498"],"lasttransactionid":"498","errormessage":"the units specified contain more precision than is allowed for the order's instrument","errorcode":"units_precision_exceeded"}
[GBP/USD:NET:S00478] - can't close at attempt 0, 911@1.32409  at 16:11:22


Zorro tries to close 91.1 units. The open position is 911 units. The log also correctly prints that 911 Lots are supposed to be closed. But the order comes out wrong. This is with the new Oanda.dll posted in this thread, I made sure. And since this is a Z system, I can't fix this in the code. Version 2.40

Edit: Just want to add that the same instance managed to correctly close a USD/CAD position before that. Whatever that means.

Last edited by MegaTanker; 12/21/21 21:22.
Page 3 of 4 1 2 3 4

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1