Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

darthtrader3.0beta

Members
  • Content Count

    119
  • Joined

  • Last visited

Everything posted by darthtrader3.0beta

  1. Well here I proudly present the most useless indicator ever made...load up the chart, load the indicator and it puts a black box over your entire chart... Really though, I guess Ninja doesn't have documents for the stuff they are doing as far plot overrides? If you put this in an empty indicator, then put the output window next to the chart and play with it you can get a feel for what these methods are doing. public override void Plot(Graphics graphics, Rectangle bounds, double min, double max) { Print("ChartControl.BarSpace" + " : " + ChartControl.BarSpace); Print("ChartControl.CanvasRight" + " : " + ChartControl.CanvasRight); Print("ChartControl.CanvasLeft" + " : " + ChartControl.CanvasLeft); Print("ChartControl.BarMarginRight" + " : " + ChartControl.BarMarginRight); Print("ChartControl.BarMarginLeft" + " : " + ChartControl.BarMarginLeft); Print("ChartControl.BarsPainted" + " : " + ChartControl.BarsPainted); Print("ChartControl.BarWidth" + " : " + ChartControl.BarWidth); Print("bounds.X" + " : " + bounds.X); Print("bounds.Y" + " : " + bounds.X); Print("bounds.Height" + " : " + bounds.Height); Print("bounds.Width" + " : " + bounds.Width); Print("-----------------"); System.Drawing.SolidBrush myBrush; myBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black); graphics.FillRectangle(myBrush, new Rectangle(ChartControl.CanvasLeft,ChartControl.CanvasLeft,ChartControl.CanvasRight,bounds.Height )); }
  2. I don't think its discouraging at all, people just come to this game with the wrong mindset. Even on message boards and that, people will post you need 6 months or whatever to learn...give me a break. Its like saying in the last 6 months you fixed your furnance and installed an air conditioner so why not try starting your own heating and air conditioning business. Starting out its even worse than that though, more like you changed a light bulb and now feel ready to start your own business as an electrician. All these small business fail and people usually start a business in something they know alot about. If you don't take the time to learn your craft, sharpen your tools, learn to keep the books, have enough capital to get going then you should expect to fail, at any business.
  3. Well I should add all this slop I'm posting is namely getting ready for Ninja 7..Maybe someone in the future is learning C#/ninja and can find it usefull..also its incase I lose something in all the junk half finished indicators/strategies on my machine now.. I certainly want to convert this to onmarketdata or however they are going to be handling tick back fills in NT7. The volumeprofile indicator that comes with ninja uses the sorteddictionary and is tick by tick if you want a proper example. With all the graphics override though its hard to understand if you just want to see how sorteddictionary works. As far as the speed, I guess you could do it faster if you knew alot about hashing. There is no way though I could do it faster though, I'm sure my sorting algorithm would be terribly slow and totally wrong. Having that done behind the scenes is just awesome if your not a real programmer. Especially when you consider adding new elements that need to go between 2 that already exists..you don't have to mess with moving the array all over the place. Next I'm going to try to make a version of market profile with this and to learn to override plot. One thing I dont get is why they didnt make a big custom function library for plot overrides. Draw lines, draw rectangles, get X Y coordinates, last bar painted, first bar painted...there is only a few things you would want to do but have to dig through all this convoluted code in the indicators right now.
  4. I've spent the last week trying to figure out the sorteddictionary in C# and finally got something to look like its doing something. This is an incredible datastructure, since once you get this cooking it makes market profile type stuff rather easy data wise. Here is some code that should look to see if a price is in the dictionary, if its not add it with the volume of the bar, then looks to add the additional volume if the price comes up again. Then spit it to the output window: variables private SortedDictionary<double, double> PriceVol = new SortedDictionary<double, double>(); private double price = 0; private double volume = 0; private double tmpprice = 0; private double tmpvolume = 0; private int count = 0; protected override void OnBarUpdate() { price = Close[0]; volume = Volume[0]; if (!PriceVol.ContainsKey(price)) { PriceVol.Add(price, volume); } if (PriceVol.ContainsKey(price)) { double volume2 = PriceVol[price]; volume2 += volume; PriceVol[price] = volume2; } count = 0; foreach (KeyValuePair<double, double> keyValue in PriceVol) { tmpprice = keyValue.Key; tmpvolume = keyValue.Value; Print(count + ". " + tmpprice + " - " + tmpvolume); count++; } Print("------------------------------");
  5. Its even worse than that..how can anyone at retail even have a clue about the markets and call themselves a "scalper"???..Retail scalpers are morons taking extremely small "positions" profit target wise, probly don't even know they are being front ran numerous times by algo market makers before the quote even hits their eyes..I guess the whole few years I've been into this game makes me old school that to be a scalper you buy the bid, sell the ask, make a market with your capital and collect the difference... what an original idea that is.
  6. This is exactly where the C# based trading platforms shine. A sorteddictionary in C# is a lovely way to do a hash table which is the data structure you want, not an array if your talking basically keeping track of counting.. As I've posted before, there is alot of "meat" to the ideas here but they are bogged down in the wrong use of very defined terms. "volume distribution function"....none of these threads really talk about a probabillity distribution of volume, "volume distribution function" in the context of these threads means assuming a normal distribution then counting volume..there is a HUGE difference between that and a ""volume distribution function".. Comeon, if I'm talking to the wall here I seriously give up and will just keep my thoughts private.
  7. I think you have to keep in mind with the sharpe ratio is that alot of the customers of alternate investment vehicles that would use a sharpe ratio, don't want to see massive spikes in the equity curve either. I mean there is no free lunch, your not going to get a massive spike without getting really one off lucky or taking more risk. Its like the mirror of a draw down. A draw down is not a huge deal if its your own money, its a much bigger deal if someone else is going to invest in you since then they want to know what the worse case scenario is if you step on a land mine the day after their money is in. If you finish the year up 50% with your own money but took a 30% drawdown midway through the year, your still up 50%, who cares. If someone else is investing in you, it could mean they are down 25% while your up 50% because they got in at the wrong time. Sharpe is interesting if your courting OPM, if its just your own money to me it seems to make more sense just to stick to profit factors since the equity curve your measuring with your own money is in reality always going to start at zero for the time period you measure. Your not going to "get in" at the wrong time if its your own money and own system.
  8. nevermind, I got random variables to seed now on each update. Just have to make the system now. In case anyone finds this in the future, for some reason you have to define things like in user variables private Random rand = new Random(); private Random rand2 = new Random(); in onbarupdate x = rand.Next(1,5); Print(x); x2 = rand2.Next(100,500); Print(x2); If you define the variables in onbarupdate it will only give you a new random number at the start of the day...no clue why.
  9. If you look up on the NYSE site...the average breakdown of trading goes 50% program trades 40% institutional trades 10% retail... "the public" simply does not matter. Shark vs Shark, us Ants are just in their way.
  10. Well this might be interesting. I've put trading on hold until ninja 7 comes out, cancelled my CME data fees and was just going to hack around on the historical data I have. I didn't realize until last week though that I get 10 minute delayed YM feeds still with real time NYSE TICK...I was just going to paper trade this morning off the tape on YM and mess around with order entries/stops but felt naked without the TICk. Then I realized I literally found the holly grail. I can say without question that if you could look at the NYSE TICK 10 minutes into the future then you have the holly grail.... Going off the TICK 10 minutes into the future using 10 contracts and a 15 point stop I pulled 135 wins and 2 losers out today... The only thing to me this shows is its completely nuts to not look at the cash when trading futures(ie the underlie of the derivative your trading) The problem I see with index futures analysis is that we are not taking into account the nature of the instrument...its ultimately an arbitrage and hedging vehicle, us 2 bit pirates are just in the way of what the elephants are trying to do. Reading the tape on YM works great right up the point the programs come in and sweep the market..then your either lucky or a victim if you only reading the tape. If there is one thing we know though its that the elephants have to be aware of the VWAP on the stocks they are trading..thats their stomping ground as far as liquidity goes. The hidden variable isn't really hidden, its just the cash vs futures. An interesting question to me is if there is some way to build a composite measure of how the elephants are stomping around the wvaps on the underlie...that probly could be alot more interesting than TICK.
  11. thanks Ryker, yes that makes perfect sense theory wise and as far as what I see on my chart in real time vs backfilled. oh S-plus, your hardcore I tried to get into R last year but never got very far with it. Scaling to volatility would probly be after I get a minute bar box plot going or certain number of tick box plot. To measure volatility the best things to me are the VIX...the average range of a 5 minute bar seems to be a decent measure of volatility for longer time frames, really I'm not quite sure the direction of that idea at the present. Have you done anything with random numbers in C#? I got stuff like this to compile but I have not been able to get a random number on a tick by tick basis.. Randvar = rand.Sample(NN); Print(Randvar); Random RandomClass = new Random(); int RandomNumber = RandomClass.Next(1, 2); My idea here is that instead of using a static stop, you can probly back out a decent scaling stop using a random trading system and a multiplier that scales to the vix tick by tick. What I would like to do here is have a random trading system that randomly enters say 200 trades a day, randomly long or short, at a random time during the day, holds for a random amount of time between 1-5 minutes and then have a multiplier of the vix that sets the stop amount for each trade. Then use the optimizer to march through different values of the multiplier and see what system performed the best. Kind of back out of the market information what the best dynamic stop size is to use for my trading time. Then maybe each day back test a week back and use that to set my stop instead of a hard arbitrary "20 point" level. I guess this assumes though that there is a correlation between between the VIX and a 1 minute bar range or whatnot. If that doesn't hold water you could still march through a stop size with the random system, would seem better than nothing.
  12. I'm not really sure what you mean...could you restate that as code? Also this is kind of an early experiment in what I ultimately want my charts to look like... Have you ever checked out box plots from a stats book? http://en.wikipedia.org/wiki/Box_plot To me the optimal chart would take every tick into consideration, but assume no distribution to the data, and not weight any tick more than any other tick no matter how you decided to chop up the data to make your summary of that data... For a double auction market...it would seem to me the optimal way to do this would be with a box plot that scales how it chops up things to volatility...how to get to that point is what I'm trying to figure out with these early experiments.
  13. I used it about a year ago and I found the best part of it was to try out the delta bar plot. I think I was using 200 delta bars on YM but you just had to adjust this depending on the speed of the market at the time. Delta bars are just basically a constant volume plot but new bars are plotted once a certain number of transactions have cummulatively went off at either side of the bid/ask, 200 in the case above. What it gave pattern wise was very nice for trading breakouts. The bar would stall, give you a nice range to watch and then clearly plot new bars once the breakout occured. As far as the footprint itself, I found it more usefull to use in the opposite of what it seems to be intended for. If it takes heavy delta to one side of the market to move price to a certain level then the move tends to be running out of gas. Good stuff for exits, for entries I would think you would almost want the color scheme reversed. Personally, I don't really understand why they don't lower the price to 50 bucks a month. At that price I would think alot of people would pay for it just to have the option of using it, it is great in certain situations. At 119 and up it seems people try it for a few months, like it, but then stop using it.
  14. Yea I don't know, I'm kind of confused after spending some time with this thing. While the bar is moving live the average price wiggles around, but I've only seen a few bars when the average price line closes that its not at the close of the bar...I'm talking maybe 1% of the time?? Maybe it has something to do with using close[0]? I mean this logic is correct right? AvgPrice += Close[0]; Counter++; AvgPrice / Counter; I tried getting the average vwap going but it didn't seem any different than the average...I don't know if that was a problem with my logic or if intra bar the volume weighting just doesn't have enough time to really weight things differently than the straight out average before a new bar.
  15. Well neural networks are one of many well studied data mining algorithms, the perceptron model is one of the oldest. The "holly grail" meme drives me so nuts because I truely believe it short changes us as retail traders as far as what software is brought to market. It just seems odd to me that we can buy software that can plot every absurd idea known to man, ships with every useless indicator ever devised but you can't buy off the shelf retail software that stores the thousands of dollars of TICK data that we are all streaming to our machines daily in a useable format like SQL. You basically have to do it yourself. I installed some poker software the otherday that installed SQL light for a database to keep track of players betting and it has simple tools for manageing the database. I guess my point is I've never been interested in something and part of online communities that shun technological innovation like retail trading does. Music technology is probly a better analogy. Of course you can still record music with a 4 track recorder but the music world jumped all over the advancing computing power in the 90s like there was no tomarrow to the point that you can do things with an off the shelf computer today that was totally unimaginable 15 years ago for any amount of money. Retail trading software is basically the same as it was 15 years ago with some minor tweaks. The only guys who have truely embraced technological innovation are the big guys.
  16. I've posted before, I just think the whole concept of the "Holly Grail" should be disgarded. Its just a poor metaphor for a fruitless path as far as trading research goes. The biggest danger with the holly grail mindset IMO is that it ignores your opponent. We aren't really trading against eachother here, we are trading against hundreds of millions of dollars in data analysis and infrastructure trying to analize as much data as possible and find the smallest relationships between the data sets. To me if you want to sharpen the edge of your analysis, the trail has already been cut for you. Its obviously not in throwing 40 indicators all doing basically the same thing, then using the tradestation optimizer to dance through different settings find patterns in the clouds. The way to do it is store massive amounts of tick data of related instruments and then use the well studied field of data mining algorithms to find non random patterns. The barriers to entry are nothing financially, the software is all there ready to use for free basically. The real barrier to entry to the next level of analysis is that the knowledge and background needed to take advantage of this stuff is substantial. Just because something is hard to do, to write it off as the search for something that doesn't exist, when your literally trading against the thing you don't believe exists is foolish.
  17. I tried a daily profit target last year and while it was helpfull I found a daily trade limit to accomplish the same thing. My huge problem last year was that I would always trade far better after a loss than a win or two..the real issue though was that my entry was not defined enough so once I got a few wins I would take lower probability trades than if I had just lost. If that is a problem give yourself 1 real money trade a day, then once you fired that shot you can only paper trade until the next day. The problem with a profit target is you don't want to put an artificial and arbitrary cap on what would have otherwise been your biggest wins.
  18. Haha, I just bought a new hat to wear while trading....I wanted one of their stock certificates to put on my wall but damn they are expensive right now. Futures trading wise I would say I'm somewhere between a scalper and position trader...investing wise I just stick with the index or sector ETFs. Would like to eventually have a mechanical swing trading equity system.
  19. Totally agree. Thats why I would only do this if like brownsfan said, it was close family or friends.. The bigger risk to this business I would think is even if the student is profitable, it won't be to long before they have adapted things to make it their own and don't feel they owe the fee anymore. I don't see how you could really stop someone you never met from saying they are quitting trading, closing their account then just opening with another brokerage and you never hear from them again.
  20. Just to throw my 2 cents in along the lines of what Walter said.. Here is an excersise..think about how many hours you have spent reading, researching, looking for the entry to trades...Now contrast that to the time and research you have put in on the exit.. Or look at the trading literature..thousands of books on various entries, a little bit on stops and exits can be summed up as "make some money or get stopped out". Its kind of ammusing no one has ever bothered to write an entire book on how to exit trades. Its a strange bias that has come to us from the way we come to trading and the literature. This is something I've just come to in my trading. While I feel I'm confident enough in my setups, my exits are most purely random and I need to do alot of homework in this area to get both sides of the trade more in line. I think you can sum it as if you haven't done your homework on entries, you should be nervous when you enter a trade. If you haven't done your homework on exits..you should be equally as nervous.
  21. Well this has nothing to do with TICK but could be interesting, I believe the logic is correct. This chart is basically a "moving average" that is just connecting the average price of a 5 minute bar to the next average price of a 5 minute bar tick wise. One thing that sticks out on any chart is that on a move most the bar is under the average price line. Could be usefull as far as a filter to not get in if price is on the wrong side of the average line if thats the direction your looking to trade. Doing this with an intrabar vwap might also be quite interesting. #region Variables // Wizard generated variables private int myInput0 = 1; // Default setting for MyInput0 private double Counter = 1; private double AvgPrice = 0; private DataSeries myDataSeries; // User defined variables (add any user defined variables below) #endregion protected override void Initialize() { Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0")); myDataSeries = new DataSeries(this); CalculateOnBarClose = false; Overlay = false; PriceTypeSupported = false; } /// <summary> /// Called on each bar update event (incoming tick) /// </summary> protected override void OnBarUpdate() { if (FirstTickOfBar) { AvgPrice = 0; Counter = 0; } AvgPrice += Close[0]; Counter++; myDataSeries.Set(AvgPrice / Counter); Plot0.Set(myDataSeries[0]); }
  22. This to me is why though you should probly not start trading 1 contract. You would be far better off saving your pennies until you can trade 2 or 3. Otherwise your not accepting that there is a random/noise/luck element to trading, some of this is not quantifiable. To me a good newb betting strategy is to have 3 contracts, with a tight stop, all out if the trade goes totally against you. Then on the first contract you want to take profit quickly as a means of getting the stop to break even or slightly profitable on the other 2 contracts. Then view the "meat" of the winning trade as the second contract, with the 3rd left on with a stop that slightly eats into the profit of the second but stays on just incase you can get lucky with a bigger win on the 3rd and then trail the 3rd stop after a certain amount ahead. This assumes you have an edge at entry though that doesn't need to take insane amounts of heat to have expectancy. I imagine there is a better strategy still with putting on 1 contract to start but I haven't really figured that out yet.
  23. To me I think the biggest thing is you have to decide as quick as possible that your either going to become a professional or your going to become a victim. This game doesn't lend itself to dabbling in your spare time, if you do that you won't have the "chin" to take the punches to the face that are coming while you learn, there is not much middle ground. Get a decent overview of trading concepts and then either go all in and bet your life on it with no plan B or fold your cards and find an easier hobby. I just don't see how you can get around the fact that failure is almost a given at this game unless you truely come to it with the mindset and life situation that failure is not an option.
  24. Well I both agree and disagree. Personally, I think traders should throw out this bizarre concept of the "Holy Grail"..using modern data mining techniques is not akin to a Monty Python movie and running into the Black Knight. I do agree with the quick buck part though, there is nothing quick about learning these techniques. The bigger problem I see is that retail trading software that tries to use data mining, tends to not leverage what the computer is better at doing than the brain. A week of 5 minute OHLC bar data on YM is only 1560 data points. The computer doesn't have much an advantage data mining that data set vs the brain. That is a very simple summary of the trading data that could be used, most of it has been discarded. Now if you store tick data for all 30 DOW stocks and tick data for YM for that same week, now your on the computers playing field and the brain simply can't compete as far as analysis goes. If there are patterns in 5 minute OHLC data then certainly there are patterns in the underlieing data that make up those 5 minute bars. Where are retail software fails us is that we can barely store that level of tick data in a useable way, let alone do any kind of analysis on it, let alone do any kind of complex machine learning/data mining analysis on it... Its just not economic to build and sell that kind of software to the retail crowd, your basically on your own.
  25. haha nice...I wasn't even thinking that BarsInProgress is the index itself, so no reason to search for it. if (FirstTickOfBar) was what I was looking for as far as a general concept goes for those other questions...I think I'm going to try to build a plot of the intrabar POC/PVP like what Market Delta does.. I always thought that was handy information. I'm pretty sure custom data series can hold an array of any other data structure..How to do this is all right there in the Volume Profile indicator that comes with Ninja, very slick programming in that thing. My only real complaint about Ninja is while their forum is amazing for what they do support, discussions like this quickly falter with the "we don't support this" post that will eventually come. Thanks a bunch for letting me toss the ball around with someone who knows alot more than I...
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.