|
3 registered members (Ayumi, Akow, AndrewAMD),
1,505
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Oanda Roll (swap) Actually Available?
[Re: DdlV]
#483268
05/13/21 17:56
05/13/21 17:56
|
Joined: Jun 2013
Posts: 1,609
DdlV
OP
Serious User
|
OP
Serious User
Joined: Jun 2013
Posts: 1,609
|
|
|
|
Re: Oanda Roll (swap) Actually Available?
[Re: DdlV]
#483300
05/17/21 12:13
05/17/21 12:13
|
Joined: Jun 2013
Posts: 1,609
DdlV
OP
Serious User
|
OP
Serious User
Joined: Jun 2013
Posts: 1,609
|
Thanks @AndrewAMD. This bit of the Python code would seem to support your guess:
# Calculate RollLong and RollShort in account currency, for the quantities used by Zorro
financing_pos_size = defaultdict(lambda: 1, {'CURRENCY': 10000}) # Everything but CURRENCY defaults to 1
data['RollLong'] = data['financing.longRate']/365 * \
data['Price'] * \
data['type'].map(financing_pos_size) * \
(data['currency']+'/'+ACCOUNT_CURRENCY).map(conversion_rate)
data['RollShort'] = data['financing.shortRate']/365 * \
data['Price'] * \
data['type'].map(financing_pos_size) * \
(data['currency']+'/'+ACCOUNT_CURRENCY).map(conversion_rate)
Would still appreciate @jcl's thoughts. Of course "we don't code to undocumented things" is an appropriate response, but perhaps the plug-in could handle these via a "use at your own risk" option? Thanks.
|
|
|
Re: Oanda Roll (swap) Actually Available?
[Re: DdlV]
#483317
05/19/21 00:20
05/19/21 00:20
|
Joined: Jun 2013
Posts: 1,609
DdlV
OP
Serious User
|
OP
Serious User
Joined: Jun 2013
Posts: 1,609
|
|
|
|
|
|
|