You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. In the bottom left corner of the platform, you will find the **Settings** option. Click on it.
45
+
3. A popup window will appear. In the menu of the popup, look for the last option: **FIX API**.
46
+
4. First, click on the **Change Password** button. Make sure to add a numeric password of at least 8 digits.
47
+
5. After changing the password, click on the **Copy to Clipboard** button from **Trade Connection**.
48
+
6. Now, let's move to the **Trade Connection** section. Here, you will receive your data in the following format (this is an example with IC Markets for a real account):
49
+
50
+
- Host name: (Current IP address 168.205.95.20 can be changed without notice)
51
+
- Port: 5212 (SSL), 5202 (Plain text)
52
+
- Password: (a/c 1104928 password)
53
+
- SenderCompID: live.icmarkets.1104926 or demo.icmarkets.1104926 or live2.icmarkets.1104926
54
+
- TargetCompID: cServer
55
+
- SenderSubID: TRADE
38
56
39
-
import time
40
-
import logging
41
-
from datetime import datetime
42
57
43
-
logging.getLogger().setLevel(logging.INFO)
44
58
45
59
60
+
61
+
### Import libraries
62
+
63
+
```python
64
+
from ejtraderCT import Ctrader
46
65
```
47
66
48
67
### Fix account login and details
49
68
50
69
```python
51
-
server="h8.p.c-trader.cn"# Host name
52
-
broker="icmarkets"
53
-
account="3152339"
54
-
password="393214"
55
-
currency="EUR"
70
+
server="168.205.95.20"# - Host name: (Current IP address 168.205.95.20 can be changed without notice)
Due to certain limitations of the FIX API, there's a specific issue that arises when both the Stop Loss (SL) and Take Profit (TP) features are used concurrently. This issue occurs when one of them is triggered, the other remains open and will execute when the price reaches the specified level again, causing it to open another order. This issue needs to be addressed either within the ejtraderCT library or the application itself.
218
239
219
-
#### Modify order SL and TP and entry price
220
-
```python
221
-
id="order id "
222
-
stoploss ="stop loss price""
223
-
takeprofit="stop gain price"
224
-
price ="limit or stop entry price"
240
+
However, you can avoid this problem by using either the SL or TP, but not both simultaneously.
225
241
226
-
api.orderModify(id, stoploss, takeprofit, price)
242
+
## Contributing
227
243
228
-
```
229
-
## Contributors:
244
+
We welcome any contribution to `ejtraderCT`. Here are some ways to contribute:
245
+
246
+
1. Report issues or suggest improvements by opening an [issue](https://github.com/ejtraderLabs/ejtraderCT/issues).
247
+
2. Contribute with code to fix issues or add features via a [Pull Request](https://github.com/ejtraderLabs/ejtraderCT/pulls).
230
248
231
-
<!-- CONTRIBUTORS:START -->
232
-
<!-- CONTRIBUTORS:END -->
249
+
Before submitting a pull request, please make sure your codes are well formatted and tested.
233
250
234
251
## Acknowledgements
235
252
236
253
I would like to express my gratitude to [@HarukaMa](https://github.com/HarukaMa) for creating the initial project. Their work has been an invaluable starting point for my modifications and improvements.
0 commit comments