Comments (5)
If you create a new position opposite to the one you currently have, the position will be closed or reduced.
- If you have 1000 USD/EUR sell position, and you buy 1500 USD/EUR, then 1000 USD/EUR sell position will be closed and 500 USD/EUR buy position will be created.
- If you have 1000 USD/EUR sell position, and you buy 500 USD/EUR, then 500 USD/EUR sell position will be reduced.
At that time, closed or reduced position information will be returned in tradeReduced
or tradeColosed
.
from jiji2.
- If you have 1000 USD/EUR buy position, and you buy 500 USD/EUR more, what's the result returned?
from jiji2.
In this case, new 500 USD/EUR buy position will be created, and return position information in trade_opened, then tradeReduced will be nil, tradeColosed will be empty array.
from jiji2.
I seemed to understand a little bit, for example:
- I have no position initially.
- then I buy 100 USD/EUR, return tradeOpened with internal_id_1
- then I buy 100 USD/EUR agian, return tradeOpened with internal_id_2 (new position as you said)
- then I buy 100 USD/EUR agian, return tradeOpened with internal_id_3
- I got three position by now.
- then I sell 250 USD/EUR
- final action will return two tradeColosed in array and one tradeReduced with 50
oanda dont merge position, it's strange to me.
from jiji2.
We do not have both sell and buy positions at the same time.
It seems to be a spec of OANDA API.
from jiji2.
Related Issues (20)
- How does the future works? HOT 2
- Rake spec should include sample_agents/spec HOT 4
- what's the benefits using process.post_exec{...}.value? HOT 1
- CADJPYだけエージェントが動作しない。 HOT 6
- 現在の足のN本前から(N+M)本前までの期間Mの移動平均求める方法 HOT 2
- one spec in back_test_repository_spec failed when run isolated spec. HOT 1
- Can you support an agent in simple ruby file instead of text in mongo HOT 1
- next_tickの間隔について HOT 25
- If I create buy_limit order, where can I saw it? HOT 1
- Can I specific interval for agent in live trade? HOT 1
- リアルトレードとバックテスト実施中にMongoDBのエラーが発生しました HOT 2
- 通貨違いのエージェントを複数実行させた時にそれぞれ通貨でグラフを描画することは可能でしょうか HOT 3
- 初期化処理(post_create)について HOT 4
- Herokuでデプロイ出来ない。 HOT 1
- 初期設定:証券会社の設定 でエラー HOT 2
- MARKET_IF_TOUCHED_ORDER_REJECT HOT 4
- AWSとDockerを利用したシステムのセットアップにて躓きます HOT 10
- Docker for WindowsでOANDAに接続できない HOT 2
- [include Mongoid::Document]でエラーが発生 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jiji2.