Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (EternallyCurious, RealSerious3D), 779 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 4 1 2 3 4
Oanda LotAmount in Trade Mode #484570
11/12/21 14:37
11/12/21 14:37
Joined: Sep 2020
Posts: 15
Toronto, Canada
J
JayWilly Offline OP
Newbie
JayWilly  Offline OP
Newbie
J

Joined: Sep 2020
Posts: 15
Toronto, Canada
Has anyone come across an issue with the LotAmount when trading Index CFDs with Oanda?

Correct me if I am wrong on this as I have been banging my head against the wall for the past couple days trying to figure this out.

There is an issue with how LotAmount and Lots are treated when in Trade mode for Index CFDs with Oanda. There is no issue when trading currencies. The requested AssetList provided by Oanda is correct with all their Index CFDs having LotAmount = 0.1. See included AssetList. The PIPCost reflects CAD currency as I am in Canada.

In Train and Test modes, all the relevant calculated positions sizes and performance values are correct. The problem comes about in Trade mode. Zorro executes the number of Lots, which to Zorro, represents (Lots * LotAmount) number of contracts in position size. So a 5 Lots execution represents 0.5 Index contracts, 5 Lots * 0.1 LotAmount. But to Oanda, the number of Zorro Lots being transacted, 5 in this example, represents (5 / 0.1) = 50 contracts of 0.1 LotAmounts, which is 10 times more than what is intended.

As you can see from a current NAS100 position in the table below pulled from the Zorro HTML Trading Status page, the Risk calculation of -$237 does not make sense for 27 Lots of 0.1 LotAmounts with a Stop distance from Entry to Stop of (16187 – 16257) = -70 PIPS. Using the PIPCost from the AssetList above, the Risk calculation should be -$2,339 ((27/0.1) * 70 * 0.123762), as to Oanda, the 27 Lots is 270 contracts of 0.1 LotAmounts. The Profit calculation of $3,861 in the table makes sense. There is also the CN50 position of 4 Lots listed.


Trade ID Lots Entry Time Entry Price Stop Trail Target Risk Profit Pips
[NAS100/USD:Trend:S00035] 35 27 11/10/2021 01:00 16187 16070 16257 15914 14985 -237$ 3861$ 1149.6p
[CN50/USD:Trend:L00047] 47 4 11/10/2021 08:00 15398 15580 14860 15780 16124 -267$ 922$ 1862.3p



I looked at changing the PIPCost by using SET_PATCH to accommodate the issue but realized that by making this adjustment, there would be unintended consequences of how Zorro calculates position sizes as I use the Risk trade parameter. I could also calculate the adjusted Lot amounts within the script to be sent to Oanda for execution but that defeats the whole purpose of Zorro’s functionality.

Oanda made changes to their Index CFD sizing earlier this year reducing the minimum trade size (LotAmount) from 1 to 0.1, which may not have been adjusted in the Oanda API. This, therefore, could be a bug with the API.

Has anyone experienced this?

I am using Zorro version 2.40.9.

Thanks, Jay

Attached Files
AssetsInd.csv (131 downloads)
Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484572
11/12/21 16:14
11/12/21 16:14
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
If your lot amount is wrong, check with Oanda which lot amount you really have on your account, and enter it in your CSV file. Oanda MT4 and Oanda API can have different lot amounts for the same asset.

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484574
11/13/21 17:03
11/13/21 17:03
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
I have the same issue. I have received no support from Oanda and little from Zorro. I am trying an updated AssetFix, I will share my findings if positive. Ciao

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484577
11/13/21 20:43
11/13/21 20:43
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
When this issue only occurs in trade mode, then you can use this condition to calculate a different lot size

Code
if(is(TRADEMODE))
{
Lots = ...;//Lots in trade mode
}
else
{
Lots = ...;//Lots in train or test mode
}


Hope this helps.

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484579
11/14/21 05:19
11/14/21 05: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
I will use your suggestion this coming week Grant. Thanks very much.

I have a query out to Oanda support about this as per Petra's suggestion with regards to the issue being account specific settings on Oanda's end. Will report back when hear anything.

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

Joined: Sep 2020
Posts: 15
Toronto, Canada
After multiple conversations, I was finally able to get a firm answer on the issue with Oanda. The minimum trade size for Index CFDs is 0.1 units. The issue is that the Amount variable in Zorro is defined as an integer and this needs to move to being able to handle 1 decimal place. Oanda's v20 API interpretation of Lot = 2 and Amount = 2 are the same whereby the order/trade recognized by Oanda is 20 units of 0.1 Index values. Adjusting the AssetList CSV file for Zorro to recognize the size of 1 lot being 0.1 is not being interpreted the same by Oanda. Sending an order where Lots = 23 is not 2.3 units of the Index contracts, as Zorro currently interprets it with the adjustment in the AssetList CSV file, but it is 230 units of 0.1 Index units. Sending an order with the variable Amount = 2.3 results in the truncation of the decimal place since the Amount variable can only be an Integer, which makes the Amount = 2 and then becoming 20 units of 0.1 with Oanda. Same applies to the Lots variable when equals a decimal value.

As discussed before, when in Training and Testing modes, the calculations are accurate but in Trade mode, the orders are 10 times larger and Oanda does not recognize a Lot size being 0.1.

How can this be accommodated in either the Oanda API or Zorro?

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484684
11/30/21 09:46
11/30/21 09:46
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
The Amount variable is no integer. Maybe you confused it with Lots?

If LotAmount is 0.1 then 5 Lots is the same as 0.5 Amount.

Oanda lot sizes and other parameters depend on country and platform, so the included asset list could indeed be not suited for your account. Check your asset parameters with Oanda, then adapt your asset list as described on https://manual.zorro-project.com/account.htm. Do NOT use different lots in test and trade mode, this is a recipe for disaster. If in doubt, we also have an asset list setup service.

Re: Oanda LotAmount in Trade Mode [Re: Petra] #484686
11/30/21 14:51
11/30/21 14:51
Joined: Aug 2017
Posts: 294
Netherlands
G
Grant Offline
Member
Grant  Offline
Member
G

Joined: Aug 2017
Posts: 294
Netherlands
Originally Posted by Petra
Do NOT use different lots in test and trade mode, this is a recipe for disaster.


Oops, my bad.

Re: Oanda LotAmount in Trade Mode [Re: Petra] #484690
12/01/21 05:43
12/01/21 05:43
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 reply Petra.

The Lots variable is indeed an integer.

I agree with your LotAmount example. The only problem is that Oanda recognizes the 5 Lots as 5.0 Amount or 50 x 0.1, which is 10 times more than desired with LotAmount set as 0.1 in the AssetList table as provided in my initial Post above. Editing the AssetList does not matter as any integer value sent as Lots will be 10 times the expected amount. As it currently stands, I have to divide the Lots calculated by Zorro before the order is sent to Oanda by 10 and manage any resulting decimals by rounding up or down while using the suggested code by Grant above to distinguish when in TRADEMODE and TESTMODE for the Risk and Profit calculations to be correct. There will always be a discrepancy between the trade sizes calculated in Train /Test mode versus Trade mode unless I round the calculated amounts in Test/Train mode up to the next highest decimal place to match the behavior of what would happen in Trade mode. As you stated, using different lots in test and trade mode "is a recipe for disaster" but I understand where the issues are and have made accommodations for them.

The better option is to live with the fact that I cannot take advantage of the smaller sizes offered by Oanda and adjust the LotAmount in the AssetList table to 1 rather than 0.1 in order for the Profit and Risk calculations done by Zorro to be consistent in TRADEMODE and TESTMODE, which would match Oanda's calculations. This option would, unfortunately, require a much larger account to trade a diversified portfolio of assets to include most of the CFD Indices since the position sizes would be larger requiring more margin. I would also need to use the SET_PATCH brokerCommand to use my AssetList which should override what Oanda provides as the asset parameters.

The best option would be to edit the Oanda API to accommodate how the Oanda v20 API handles the reduced minimum CFD trade size to one decimal place they implemented earlier this year as this is a global change, not a country change, given one user from Italy had the same experience as mentioned by the user in a previous post.

Please let me know if this make sense and what can be done, if anything, to be able to accommodate the smaller CFD Index minimums offered by Oanda. Thanks.

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484691
12/01/21 10:12
12/01/21 10:12
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
If Oanda recognizes the 5 lots as 5 contracts, then the live lot amount was obviously 1, not 0.1. Change it to 1 in the asset list and make sure that the size is then correct in test and trade mode. And check also with Oanda why they told you it was 0.1 when in fact it was 1. Maybe your account was not yet updated to 0.1 or that server returned a wrong value.

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

Joined: Sep 2020
Posts: 15
Toronto, Canada
The server is returning the wrong LotAmount when using the Download script to update the AssetList parameters. What they are returning is the new minimum trade size. We are able to trade the smaller trade size if we can send an order with an amount using 1 decimal place.

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484696
12/03/21 13:41
12/03/21 13:41
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
That explains it then, you can use the SET_PATCH command to override the wrong lot amount by the server.

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484758
12/08/21 06:27
12/08/21 06:27
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
I guess that should be stated in the manual that trading CFD with API is really dangerous. I can cofirm that margin requirements is 10 times higher than expected i.e. it's a bomb!

Is anybody trading CFD with MT4 and Oanda?

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484766
12/08/21 15:27
12/08/21 15:27
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
We do. That's one of our test configurations. We confirm that all is fine here with the margin. But we will of course add a warning in the manual and notify Oanda about the problem.

However, you should anyway get a warning at strategy start when the margin deviates from the asset list. Did you get it?

Re: Oanda LotAmount in Trade Mode [Re: jcl] #484770
12/08/21 18:07
12/08/21 18:07
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
I tried in real several asset file and I received Lot warnings or picost warnings. Nothing regarding margin.
Trades are 10 times bigger than expected i.e. with only one losing trade you can vaporize your account.
I Have been lucky because my trade was positive and I manually close it.
I imagine what could happen with people trading Zx systems with Oanda...
I wrote to Oanda support, Zorro support and several post on this forum regarding the issue because I guess it should be addressed as priority one.

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484772
12/08/21 19:56
12/08/21 19:56
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline
Member
MegaTanker  Offline
Member
M

Joined: Aug 2021
Posts: 101
Well I guess this explains why Z12 opens such huge index positions. I thought it was just due to the accumulate setting since the account has such low capital. It's actually up now compared to before the recent correction, but the drawdown was pretty nasty since it held a bunch of long index positions as it happened. Definitely could have blown up some accounts with tighter capital though and I'll pause this for now.

The Zorro window prints Long 1 for SPX500, Oanda receives this as one whole SPX500 contract, instead of 1 LotAmount, which is 0.1

Can this not be fixed with an update to the Oanda plugin?

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484774
12/08/21 20:42
12/08/21 20:42
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
Are you are using the oanda plugin? I thought it was the mt4 plugin?

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484775
12/08/21 21:02
12/08/21 21:02
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline
Member
MegaTanker  Offline
Member
M

Joined: Aug 2021
Posts: 101
I am using the Oanda plugin directly, yes. No mt4/mt5.

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484777
12/09/21 01:18
12/09/21 01:18
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 have a question out to their support for a couple days now about the fact that when a request is made about Lot Amount and Pip Cost, it is pushing back the incorrect values as discussed previously based upon the actual execution behavior. I updated the AssetList and using the Set_Patch broker command to use my values for the Lot size as being 1 rather than 0.1 and adjusting the Pip Cost 10 times higher. Will see how that works out. Will report back when I hear something from Oanda.

This is with the Oanda plugin directly. I do not know the behavior for MT4 nor MT5.

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

Joined: Aug 2021
Posts: 101
If the issue is with the Zorro Oanda plugin, then their support will be very confused. You mentioned in your first post that Oanda made this change from LotAmount 1 to 0.1 not too long ago, is it possible that this capability simply wasn't updated in the Oanda plugin?

Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484786
12/09/21 12:45
12/09/21 12:45
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
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.
Re: Oanda LotAmount in Trade Mode [Re: JayWilly] #484876
12/22/21 13:08
12/22/21 13:08
Joined: Apr 2008
Posts: 586
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 586
Austria
I believe you need 2.44. At least in the bug list the problem is listed as "fixed in 2.44".

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

Joined: Aug 2021
Posts: 101
That may be the case. When I last looked, the 2.44 was still in beta, so no Z-strat support. But if the Oanda.dll was the only thing changed to address this issue, it may not make a difference.

Re: Oanda LotAmount in Trade Mode [Re: MegaTanker] #487013
12/22/22 21:17
12/22/22 21:17
Joined: Dec 2022
Posts: 6
G
Gheo Offline
Newbie
Gheo  Offline
Newbie
G

Joined: Dec 2022
Posts: 6
I am curious if you were able to resolve this LotAmount issue with Oanda V20?

at present I am getting the desired position size of 0.01 when back testing but when I tried running it on my demo account the orders are being rejected with the following code.

Code
[500: Thu 22-12-22 20:56] (1.05994)
!order: {"orderrejecttransaction":{"id":"7","accountid":"***-***-********-***","userid":24221766,"batchid":"7","requestid":"25026195017760562","time":"2022-12-22t20:56:00.546953827z","type":"market_order_reject","rejectreason":"units_precision_exceeded","instrument":"eur_usd","units":"0.010000","timeinforce":"fok","positionfill":"default","reason":"client_order"},"relatedtransactionids":["7"],"lasttransactionid":"7","errormessage":"the units specified contain more precision than is allowed for the order's instrument","errorcode":"units_precision_exceeded"}
Warning 075 (EUR/USD::L) - can't open 1@1.0599 at 20:56:00AvgOpen=0.021853 SumOpen=2.119769 Counter=97


I have read all the posts on this subject that I could find as full lot positions would destroy my risk management and would like to take advantage of fractional lots.

If I misconstrue terms please help me learn, I've only been at this for a few months and am learning as best I can.
Thank you.

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

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1