Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JPY Exit Errors (Distance & Units) #12

Open
fdwillis opened this issue Dec 21, 2021 · 2 comments
Open

JPY Exit Errors (Distance & Units) #12

fdwillis opened this issue Dec 21, 2021 · 2 comments

Comments

@fdwillis
Copy link

I'm not able to exit for JPY pairs while others are working fine.

stopLossPrice = 0.0015
optionsTrail = {'trailingStopLoss' => {'timeInForce' => 'GTC','distance' => (oandaTickerUnderscore.downcase.include?('_jpy') ? (stopLossPrice * 100).round(2) : stopLossPrice.round(4))},}

updatedOrder = actingClient.account(accountToTrade).trade(openTrade['id'], optionsTrail).update

can anyone help?

distance for trailing stops are off (only on JPY)
units when partially closing a position are off (only on JPY)

I cant understand why

146817697-c4be3d32-bea5-4fe8-9207-a6b5703b8b85

@fdwillis fdwillis changed the title JPY Exit Erros (Distance & Units) JPY Exit Errors (Distance & Units) Dec 21, 2021
@kobusjoubert
Copy link
Owner

Hi there, that's very strange. If you don't mind, what does you code look like for placing the trailing stop loss?

@kobusjoubert
Copy link
Owner

Sorry just realized that you did share the code 🙄 Are you still having this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants