Jump to content

jlz

Community Member
  • Posts

    421
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by jlz

  1. The API is only available for Spreadbet and CFD accounts. That's why you get that error message.
  2. The Accept header is just to force the server to send you a specific format, a json format in this case. It is sent as a header because many servers would use xmls as the standard if nothing is specified. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept
  3. I have changed the type to .net standard 2.0. That should let you load it with both 4.5 and .net core. Pull the latest and rebuild the project. If you have any other issues with the library please log an issue on Github, I don't get notifications from this forum if I don't log in. Github will send me an email with your issue.
  4. Hi, that sounds like you could use the trailing stop option. https://www.ig.com/uk/help-and-support/spread-betting-and-cfds/orders--stops-and-limits/what-is-a-trailing-step-and-how-do-i-use-it Edit: I haven't read your last sentence where you note that you might not use it in some cases.
  5. Hi, it does work fine. I left the example at: https://github.com/AnAlgoTrader/IG.Csharp.Api.Client/blob/master/Playground/Program.cs
  6. Hi, the Lightstreamer endpoint comes as part of the authentication response. For my demo account is: https://demo-apd.marketdatasystems.com
  7. Hi, the .net example is far from ideal. I ended developing my own library. An example of how to use the LightStreamer client with it is at: https://github.com/AnAlgoTrader/IG.Csharp.Api.Client/issues/2 It does not use the DotNetClient_N2.dll where the main problem seems to be at.
  8. That's the sentence. You don't really care about where the market is going, you are fine as long as you can handle your exits. If you focus on 'when to enter' your system will be wrong most of the time, but if you focus on how to handle drawdowns you might get it right. That's why TA books are only useful as door stoppers or monitor lifters.
  9. It should work. Here is the definition of the service for more details. https://labs.ig.com/rest-trading-api-reference/service-detail?id=613
  10. Be careful with day trading. https://www.sec.gov/reportspubs/investor-publications/investorpubsdaytipshtm.html
  11. In case that you want to automate the minimum size per market there is an endpoint for it. https://labs.ig.com/rest-trading-api-reference/service-detail?id=594 The endpoint is /market/{epic}. It will give you the dealing rules for that market
  12. They don't even allow you to post your email. Ok let's try another route. I have edited the first pastebin we shared. https://pastebin.com/zkaJMCwa pass: DHAjBkgbjH You can find my details there.
  13. There's a tab called 'About me' on every profile. If you are on mobile it is at the very bottom of the page aside from 'Activity'.
  14. Hi, I have updated my profile with my GitHub account and email address.
  15. I don't know . It doesn't show who they are so I can't get mad at anyone
  16. I've got some followers on this forum that keep downvoting me everywhere They are persistent.
  17. Have they shut down your other post about the virus @Caseynotes? You have been insulting people for months and now they act on it. Interesting. You have been way ruder before, you and your minion, the clown. All the hard work that you have put into posting nonsense and memes from Twitter....They don't appreciate your purpose here. Finally there is some moderation on this forum and you get what you deserve. Frankieburgo is an unsung hero.
  18. There are a lot of commented code that does not do anything. I removed anything that does not trigger any action, so it is easier to read. I pasted the code here with some highlighting, https://pastebin.com/zkaJMCwa The link is password protected. In order to see the file use the password: DHAjBkgbjH I can see in line 48 where the TradeInstrument function starts, and in line 243 where the position gets closed. But I can't see a "reopen" routine anywhere. In order to look for places where the position is being opened look for the word "createPosition". There is only one place in the code that opens a position. Bear in mind that lines that start with ' ' are meant to be comments and do not do anything. I was expecting a call to create a new position after the stop is hit but I can't see it. Either you have some extra code that has not been posted or it is not implemented.
  19. I am not a Windows user, so I won't be able to open the Excel file. If you want to share anything send the VBA code in plain text. There are VBA developers in the forum , maybe they can help.
  20. Sure share the file, it will be easier to look at the code.
  21. You can't create positions in bulk, you are supposed to call the endpoint each time on every position. A loop should be fine as long as you can handle all responses. Bear in mind that you are only allowed to call the endpoint a number of times per minute, if you pass that limit your positions will not be created. (the exact number was somewhere but I don't have it hand :D) If you are able to create positions, your call to the endpoint is already working. In order to see where the problem is we would need to see the VBA code that you have written. I would bet on the way that code handles the response, bear in mind that the response is different when you have an error coming from the server. If you have a successful response where the position has been created you get a json like: { "dealReference": [positionReferenceId] } But if you have any error your response will be: { "errorCode": error code from the list [https://labs.ig.com/rest-trading-api-reference/service-detail?id=608] } If you are expecting the attribute dealReference and you get an error instead it will raise an exception and will hang Excel.
  22. Can you post the request headers? This error is related to a wrong header value. If you can't make the DELETE method to work use the POST method and set the _method header to DELETE. https://labs.ig.com/node/570
  23. I use lightcharts from Trading View If you need an example I put something together at: https://github.com/AnAlgoTrader/AlgoReplay/tree/master/Monitor The static.html file renders everything. The realtime.html file renders candle by candle
×
×
  • Create New...
us