Jump to content

Physicsman

Administrators
  • Content count

    557
  • Joined

  • Last visited

  • Days Won

    9

Physicsman last won the day on January 9

Physicsman had the most liked content!

1 Follower

About Physicsman

  • Rank
    Staff

Profile Information

  • Gender
    Male
  • Location
    London, Great Britain

Recent Profile Visitors

1,005 profile views
  1. Hello, If you are trading the bot for your own account then no, you do not require a license. Kind Regards, PM
  2. UpdateTrade

    Hi Garrett, It does appear to be missing square brackets is the culprit. Glad you managed to spot this and hope it has fixed the problem already. If it is still causing an error please inform us and we can investigate further. Kind Regards, PM
  3. Cancel Order

    Hi Garrett, Very hppy to hear you managed to figure out the problem and fix it. Glad that I could be of a little help. Kind Regards, PM
  4. Cancel Order

    Hi Garrett, Using the account details you kindly provided, I performed the following steps in the Postman API development tool. 1) Placed an entry order. 2) Cancelled the order that I just placed in step 1. NOTE: the headers used in calls 1, 2 and 3 are the same. 3) After placing a new entry order again, I then sent an /updatestoplimitorder call to modify the entry order. Important note: this call is only used to modify entry orders. If it is a stop loss or take profit limit order attached to an open position that you want to edit, use the /updatetradeorder call. Please try sending your calls using the same set of parameters/headers to see if you can replicate these successful calls. Kind Regards, PM
  5. Cancel Order

    Hi, Are you using a test or demo (NOT a live real money) account for your development? If it is a test/demo account only, please send me a private message with the account credentials. I can use it to send some cancel and update order calls to observe what happens. Many thanks, PM
  6. Cancel Order

    Hi, I see that you are including the authentication data in the POST body. The authentication information should be sent in the headers or in the query string, NOT in the POST body. Please try moving the authentication out of the body and into the header and that should resolve the issue. Kind Regards, PM
  7. Hello, Chart indicators are not an object or service that is requested from the API. They are calculated based on the price data using the formula specific to the indicator. A couple of places that provide the formula to calculate the EMA: https://www.investopedia.com/terms/e/ema.asp https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average Kind Regards, PM
  8. Visual Basic .NET

    Hello, The documentation for the API is at: http://docs.labs.gaincapital.com/ Unfortunately, it does not provide a guided tour or examples of how to build an application in VB.NET to perform the operations you described. The API is designed for experienced developers to use. Kind Regards, PM
  9. Hi Tiger, I think the main issue with the snippet above is that you are trying to connect to the Pre-Production Environment (PPE) rather than the Live environment. Accounts are not cross compatible across environments - hence the 401 Unauthorized. PPE is used internally only, so your account (whether a demo or actual Live account) can only connect to the Live environment. Try switching the URL to the Live environment: https://ciapi.cityindex.com/tradingapi/ Kind Regards, PM
  10. UpdateTrade

    Hi, I have answers to your Q2 from and also Q4. Q4) Yes, you can have 2 Live accounts. I suggest contacting Client Services and ask them how you would go about opening a 2nd account when you already have one. They can then inform you of the process. Q2) The order stream contains the 3 responses. Since you are using the API and listening on the LS order stream you will receive a reponse for the Sell Limit order, position 1 being closed, and position 2 with the trade size modification. The reason why the web platform skips showing a notification of the position 1 close is because the order steam response for position 1 gives the opening price and not the closing price. We decided not to show this notification as it could confuse the client when they see the opening price rather than the closing price. Kind Regards, PM
  11. UpdateTrade

    Hi, Since my reply to your Q1 is related to my answer to Q3, I shall answer Q3 first then Q1. 3) Yes this is expected behaviour. Several years ago, the US regulator passed a rule/law that forbade US clients from opening simultaneous long and short positions in the same Forex pair, which in the spot Forex world is known as "Hedging". Additionally, this lead to the First In First Out (FIFO) rule, where if you have multiple buy trades in GBP/USD for example, placing sell trades always closes the first trade you opened, then the 2nd etc. 1) As you mentioned in your Q3, your systems may trade in opposite directions in the same market. This could lead you to being flat a market whereas your systems "think" you have 2 positions open. EG: system 1 buys 10,000 in GBP/USD and then a little later system 2 sells 10,000 in GBP/USD. Your account is now actually flat with zero open position in GBP/USD. Hence, trading multiple systems on the same market is not advisable. Better would be 1 trading system per forex pair so that they never interfere with each other. From what you wrote (quoted below), it sounds as though you are thinking of mapping the close trade to system Y instead of booking it to X, even though the fill notification is for X? I think this could get very confusing if you have multiple open positions (in the same direction of course) for both System X and Y. I'm sorry it couldn't be better news, but our hands are tied by the regulators in this case. Will update you on Q2 as soon as I hear back from the dev team. Kind Regards, PM
  12. UpdateTrade

    Hello, Quick post to keep you updated. For question 2, I passed that on to the development team to look into and will reply when I have their answer. I'm also looking at your questions 1 & 3 and will reply again when I have a response to those as well! Kind Regards, PM
  13. UpdateTrade

    Hello, For US clients our system forces stops to always be for the full total position size against each Forex pair, even if as in your case, multiple trades were placed to build up the position. What you've been seeing/experiencing is not from any errors in your coding or the way you are sending calls through the API, but are a result of how the system works for US clients. I'm sorry it is not better news. Kind Regards, PM
  14. Hi Brutsi, Thanks for the clarification - and you figured out the correct reason why too. Lightstreamer throttles messages based on connection, so that is why you can see some missing ticks in the LS stream when compring it to the historical API data. Kind Regards, PM
  15. Hi Brutsi, One more quick question about a detail we want to clarify. In your very first post, from what was written it appears that the Historical data from GetLastestPriceTIcks is where the data is missing. However, your second message seems to indicate that the missing data is in Lightstreamer when compared to the historical data. Please confirm whether the missing ticks is from the Lightstreamer source or from the historical database via GetLatestPriceTicks. That way we can investigate the correct data source. :-) Thank you, PM
×