Jump to content

jlz

Community Member
  • Posts

    421
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by jlz

  1. it is all part of the usual banter/discussion. There is no harm intended. Just bored folks trying to be clever over a few big words.
  2. C# does not depend on Microsoft, there are many companies developing the framework, simply because it improved their processes over the years so much that they don't want to leave it behind. Think about the c++ can be considered the fastest language out there, c# is now at a level of optimization that can compete with c++, even at the expense of using a non-native runtime. So I don't think it is going away anytime soon.
  3. Python is way more difficult than C#, also slower and error-prone. Just watch all the messages that are coming in the forum about missing data, function errors, wrong results and so on. You will see that all of them are using Python. Also have a look at the "unofficial" Python repository, it is full of people complaining about its performance. Good luck setting up the streaming API with Python as well. Python is a language that has been there for so many years and suddenly everyone is using it. Not a single one has compared its performance over multiple systems, they just use it without comparing it with any other language. Whoever gives C# a chance they never go back to the pain of using Python. I compare it with people that buy an IPhone and suddenly they want connectivity with other devices. Any shitty android device that cost 50 quid would beat them on that. You are free to use it but at least don't say that is easier than C#, because it is not.
  4. I am not a big fan of weak typed languages, I don't understand why so many people use Python when there are languages like c++, java and c# available. I do have a python client as well in the repository, but just for the sake of having it , I don't use it.
  5. Thanks @Caseynotes I normally upload my API clients to this repository: https://github.com/oneangrytrader I played a bit with a couple of algos that were suggested by other users within the backtesting folder. Sure we can discuss methods and ways to use the API, no problem.
  6. As it is a web application sometimes you can't tell if the problem is coming from the server of you have a local problem yourself with your browser. One way to get rid any local problem is by forcing the browser to refresh the application. You can do that in Google Chrome or Opera by opening the Developer Tools window. Within the window there is an option to disable the cache under the Network tab. Once it is disabled leave that Developer Tools window and refresh the page, it will try to download all components again from the server. You will see a detailed list of all components that is trying to download and if there is one that has any problem and it is preventing to load the window it will show in red within the list. The picture below shows my attempt to refresh the page: Once everything is working fine enable the cache and close the Developer Tools window, the browser will get the latest working version.
  7. Hi, if you can pick an indicator from this library we can work out the code you are looking for. Is there any indicator in that library that gets close to what you are looking for? https://www.prorealcode.com/library/?category=prorealtime-indicators There is also a forum where people can point you in the right direction as well: https://www.prorealcode.com/forum/prorealtime-english-forum/
  8. Classical music is perfect to develop schizophrenia. That is why it is used in many horror movies.
  9. https://www.youtube.com/watch?v=WqRYBWyvbRo https://www.youtube.com/watch?v=prEbTlIxxrI https://www.youtube.com/watch?v=Z1C4lrcQBZw https://www.youtube.com/watch?v=EluzTj88tWU&list=PLYLwvez_yi_c-2utEh-jueOSB3GhAIUGV
  10. No problem, let's try something out. Think about that we have a demo platform where you can execute anything I will code, so there won't be any harm to try it out.
  11. No problem, I enjoy these conversations. An algorithm is by definition a routine that can be executed multiple times, that takes an input and produces an output. They are also called problem-solving routines. They can be as easy as a simple sum, i.e. taking two numbers and producing the sum as a result. And complicated enough to solve a very complex mathematical riddle. Normally they are defined in pseudo-code in the design phase so then they can be translated into any programming language. If we look at trading we need to classify what could be considered as inputs, actions and outputs. Inputs are normally values provided by your data feed: Price, volume, indicators, level 2 data, orders, news. Whatever is provided externally to you and cannot be changed. You use them as they are, they are immutable at a specific time. Actions are the ones you can produce as a trader: Buy, sell, send order, send limit order, take profit and so on. Normally they can relate to what you could do with your mouse as a person. Outputs are the reports of your actions: Green if positive, Red if negative, reports, summaries, profit charts. A simple one as an example can be: 1. Subscribe to price changes on USD/GBP 2. When price reaches level 12345 BUY : Size = 1 3. Wait in a loop for price to change : check every minute 3a. If price reaches 12380 - SELL : Size = 1 (Limit and Take Profit) 3b If price reaches 12300 - SELL : Size = 1 (Stop and Take Loss) You can see that is pretty straight forward to define. It can be as complex as you like but essentially the computer is waiting for a path to follow. The complexity level will come from how many steps would you want your system to perform. Then that pseudo-code can be written into a programming language by a developer. A useful tool to define these algos is the flow chart. It can give you a quick snapshot of what your system might want to achieve. https://en.wikipedia.org/wiki/Flowchart
  12. I personally don't use any technical analysis but I listened the other day to a professional trader that uses Fibonacci patterns and she claims that indicators are getting more important these days exactly because there are developers trying to code algorithms. Since coding needs an exact value to enter and exit a trade, an indicator gives them the exact values they are looking for. https://www.youtube.com/watch?v=J-9HtEg4lcY We can classify algorithms depending on the frequency they use to trade. The ones that I think are affecting the market are High Frequency Algorithms that execute trades under a second (100 to 200 ms). They get an edge simply because they are getting the price before anyone else and can act faster. Because of it exchanges are implementing something that I found really interesting, they are extending cables to slow down connections so those algorithms get to a level that is "fair" to everyone. The video below shows how they do it. https://www.youtube.com/watch?v=d8BcCLLX4N4&feature=emb_logo Those algorithms are quite advanced and need a level of computing power that is not accessible to retail traders so they are completely out of our reach and I think they should be ignored. I consider them like another player like whales or dark pools that I don't have access to and don't get any information of what they do. Then we enter in Medium or Low Frequency algorithms. Depending on who you talk to they are classified in a frequency between 1 minute and 1 day per trade. These are the ranges I use. Pretty easy to develop and schedule in a cloud server for a small amount per month. There are many tools available for free and even brokers like IG give you code samples to execute your system. Tools like Pro Real Time or Metra Trader have this kind of ability to execute automated trades. I don't think these algorithms are changing the market per se, they improve the way retail traders act just because they are executing orders without thinking about it, so emotions are completely removed from the equation but I don't think they are fast enough or have the right volume to change a market. You could say that developers have a small edge against purely manual traders but that would be true if the system that a developer is executing is properly designed and as well as being profitable doesn't fail and execute all trades perfectly. In the professional world I would agree that coding is making a big difference, you just have to see how trading floors are not that busy anymore but in the retail world I think we are just all on the same boat. For me personally what has done is to remove myself from the ability to trade. I am the reason why my trading failed so coding a system made the difference because I was able to get rid of myself to trade.
  13. I offered myself in the forum a couple of times to people that don't know how to write code. I have worked in the past with traders that wanted to automate their system with good results. I say it again, if you want something automated we can work on it. You get the benefit of executing your system by a bot and I get to see what you are doing and the way you think. An algorithm is no more than a group of sentences that matches every single possibility into a system.
  14. There is a guide at https://www.gov.uk/tax-sell-shares/work-out-your-gain
  15. A well defined plan will get rid of all your emotions. Trading has to become a boring job to be profitable, one that you do without getting any feelings from it, very close to what a robot would feel if it would behave like a person. If you are able to take a loss and continue like nothing happened then you are handling just numbers. If the meaning of taking a loss is no longer similar to a painful feeling you have reached a milestone. Two years ago I told every single one I met that I was getting into trading, it was so exciting that I didn't understand what I was getting into. Today I don't even talk about it with anyone, my relatives think that I stopped all together. I avoid getting into any conversation about it with anyone, very much like I would do with my IT job. No one is interested in hearing about my job, so trading has to become the same, another job. When is no longer exciting, loses don't produce pain and the only way to achieve that point is by executing a system step by step. When everything is scripted you know what is going to happen, you are expecting the result way ahead it comes, so feelings are way more reduced. There are many books on the topic but one I like is this podcast: https://www.youtube.com/watch?v=B9Z9qUTTuhA There are a couple of parts, they gathered together good advise for retail traders.
  16. An active mind needs to pass through all the stages including the ones we consider negative. I always like to refer to this painting when I talk about this subject. https://en.wikipedia.org/wiki/The_Sleep_of_Reason_Produces_Monsters The one that we must control is anger because produces an effect in others, normally a negative one. But the ones you have described are perfectly fine if you understand them as part of your personality. A person cannot be forever happy neither sad. We inflict guilty to ourselves when we don't reach happiness because of those never ending marketing campaigns that are forcing us to look for it. Trading magnifies the adrenaline rush of regular emotions so either the peak of the decline of what would be a normal state of mind gets magnified as well. A person can get addicted to adrenaline and create a behaviour to produce it, hence here we are on Sunday night looking at the clock counting hours to have a go again.
  17. I started losing massively as well and what improved my situation was the ability to follow a system. If you don't have one that is clearly a flaw to fix. We discussed in this post our loses : https://community.ig.com/forums/topic/12368-whats-your-record-for-the-most-losing-trades-in-a-row if you want to laugh, we all have been there. What went wrong for me, I: ... didn't have a plan to exit before I entered, no risk management at all. ... executed my trades manually. ... revenge-traded chasing loses. ... used indicators. What went right for me, I: ... removed completely all indicators, I entered randomly. There is no way I can justify why I entered in a trade using indicators so I removed them, I also didn't look at charts at all. ... had a clear exit point that I never changed and executed with stoicism, specially when taking loses. This came out of a risk management plan. ... automated every single trade and set my trailing limits and stops loses in a separate database. This can be done with orders trough the web interface, it was just my preference to do it. ... never read the news, specially the ones specialized about stock markets.
  18. Would you be willing to share your trading diary? We can run backtesters to highlight what could have been done to improve your history of trades. If you are planning to start with a new system you can post it here in the forum or at: https://www.mql5.com/en/code People there are great at giving feedback that can improve your system.
  19. You can also try to calculate market volatility. http://1.droppdf.com/files/gxQpD/volatility-trading-2013.pdf
  20. ahh, that is why I don´t like weak-typed languages. C# would have spotted that error in the fist run. Also looking at the repo you sent, it seems that the streaming API has many errors and there are pending pull requests to be completed. The C# library works without any problem so you might want to have a look at it and give up Python.
  21. I always develop my own libraries so I don't have to deal with others' bugs. Where did you get that library? Let me clone it and see how the headers are being set up there. Is there any github I can clone to test it?
  22. I just realised that the "orderType"is a variable and is not a parameter, ignore that line about "type" , the rest still applies
  23. You have two parameters that conflict with each other, "timeInForce" and "goodTillDate". Change the "orderType" parameter to "type" I moved what I had in C# to Python in this repo, so it is easier to point things out: https://github.com/oneangrytrader/brokerapiclients/blob/master/IG.Python.Api.Client/tests/TestIgClientWorkingOrders.py Within the test you can see the parameters that I am using. The test uses GBPUSD with a limit and a stop of 100 away from the initial level.
  24. The gold market again... Interesting that you are talking about the same market. If I search on the forum for the same issue they mostly point to metals. Gold appears a few times.
  25. If it is liquid enough and the order should have been filled then the case is set. I can't tell if limit orders are working because I use a private database where I set those levels, then I send orders at market level through the API so I always get filled, "sacrificing" a couple of points here and there. Do you use limit orders yourself and can tell if they work or not?
×
×
  • Create New...
us