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.
ryker
Members-
Content Count
43 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Articles
Everything posted by ryker
-
Ninja Traders...lets Build a Better Mousetrap
ryker replied to darthtrader2.0's topic in Market Internals
Ok I'll try to be a bit clearer (english is not my native language). If you apply the indicator on a chart, because of no tick backfill, OnBarUpdate will be called only once at the close of the bar and not at every tick so because of that, your average will be: Close[0]/1 as you enter only once in OnBarUpdate. Now if you apply your indicator before start of day, all values before open won't be accurate but as the ticks come through (If CalculateOnBarClose=false), you should see accurate values for your indicator, as OnBarUpdate will be called several times for the same bar. Hope this makes sense now? As for box plot, yes I do use it in S-Plus at work, it can be quite useful. But I'm not sure I understand what you'd like to do with it... How would you measure the volatility? -
Ninja Traders...lets Build a Better Mousetrap
ryker replied to darthtrader2.0's topic in Market Internals
The logic looks fine but I think you should use this indicator from start of day till end of day without any refresh. Otherwise on historical data your code will return Close[0] / 1. -
Ninja Traders...lets Build a Better Mousetrap
ryker replied to darthtrader2.0's topic in Market Internals
It looks like that your average price is the close of the bar (would make sense if this indicator has been applied on historical data I think)? Have you tried doing this on an intraday vwap price yet? -
Ninja Traders...lets Build a Better Mousetrap
ryker replied to darthtrader2.0's topic in Market Internals
About the BarsInProgress, it holds an int value, so it is the index you're looking for here. If you do it this way: for(i = x, x < 499,x++) if(BarsInProgress == x) do something return; You'll end up doing too many operations for nothing (but it also depends on what you're trying to achieve here). Let's say you have an array of weight called myArray, then you need to do that: /// <summary> /// Called on each incoming real time market data event /// </summary> protected override void OnMarketData(MarketDataEv entArgs e) { if (e.MarketDataType != MarketDataType.Last || e.MarketData.Ask == null || e.MarketData.Bid == null) return; if (e.Price >= e.MarketData.Ask.Price) { total++; UVOL += e.Volume * myArray[barsInProgress]; } if (e.Price <= e.MarketData.Bid.Price) { total--; DVOL += e.Volume * myArray[barsInProgress]; } } PS: It's just an example, I'm not entirely sure this is the correct way of calculating UVOL & DVOL. For your question, I think you'll need to create a custom data series of arrays (if possible?) that holds the values you want and then plot that (but I'm not sure I understood what you try to do here). Use if (FirstTickOfBar) to reset your values in OnOrderUpdate with a 5min serie and calculateonbarclose set to false. -
Ninja Traders...lets Build a Better Mousetrap
ryker replied to darthtrader2.0's topic in Market Internals
I think you can use BarsInProgress as your index here. You need to construct an array with the weight associated to each index and access it using BarsInProgress. You can store lastPrice as well as suggested by BlowFish to calculate the index value. It should not be too hard to implement adding some code in the version of OnMarketData I wrote above. But you're right though, that if you refresh your chart you'll lose everything... I'm not sure that NT7 would bring backfill but at least you'll have backwards compatibility (from what they said on their forum) so you should be able to continue to use your code with NT7. -
Ninja Traders...lets Build a Better Mousetrap
ryker replied to darthtrader2.0's topic in Market Internals
It would be probably better to write this in OnMarketData I think and not in OnOrderUpdate. As for the loop, I think you should get rid of it, cause as the OnOrderUpdate is fired every new tick, you'll end up adding or substracting 50 times for one tick (hope this makes sense?). You only want to increment total on a new tick. I'm not sure on the calcul that needs to be done. Is it for every new tick, it tick up then total++, if tick down then total--? Uptick if the ask is hit, and downtick if it's the bid. Is that correct? Bump: I think that something like the following should do what you want: /// <summary> /// Called on each incoming real time market data event /// </summary> protected override void OnMarketData(MarketDataEventArgs e) { if (e.MarketDataType != MarketDataType.Last || e.MarketData.Ask == null || e.MarketData.Bid == null) return; if (e.Price >= e.MarketData.Ask.Price) { total++; UVOL += e.Volume; } if (e.Price <= e.MarketData.Bid.Price) { total--; DVOL += e.Volume; } } Remove everything in OnBarUpdate, and only keep it for StrategyPlot, then keep also initialize. Also, I've added calculation for UVOL and DVOL (but not sure if this is correct though). PS: I haven't tested this yet, I've just written it quickly. -
I got them for free at esignal (I subscribe to esignal data access + future data + delayed data for futures + cbot minis + ice futures). The sale told me that they were included in the package (although I don't know which one).
-
Ninja Traders...lets Build a Better Mousetrap
ryker replied to darthtrader2.0's topic in Market Internals
I've never done any testing in NT regarding what is the maximum number of instruments we can add in the strategy. But it all depends on your actual setup and also on your computer. I'll run some tests this week by adding a few instruments in a blank strategy and then running some simple calculations on them. As for NT7, I don't think the multi instrument indicator would be too much different thant the multi instrument strategy but NT7 will support multiple cores so if you have a powerful CPU you should be able to have a bigger list than in NT6.5. I saw NeoBreath and it looks quite cool, I don't think that NT7 would have something similar and the multi instrument indicator won't be probably as quick as NeoBreath (although I'd like to be wrong here ). -
Ninja Traders...lets Build a Better Mousetrap
ryker replied to darthtrader2.0's topic in Market Internals
Hi darth, Using the strategyplot to display markets internals is quite easy to do and also using it to calculate and display some indicators based on a few instruments is quite easy but if the list is too big NT won't handle it (I can't say what is the limit though...). I think you're right by saying that we could bring down the number but it would require some quantitative analysis which would be probably better to do outside NT (you can plug NT to a statistical software). Do you use some statistical software? -
Yes it is the problem. The spreadsheet can't fetch the data for you unless you have a bloomberg terminal. If you don't you need to input your data. Also, if you have a realtime feed, you can have a realtime update of the spreadsheet (just need to export the data in the csv file every minute).
-
Hi Ricardo, Thanks for your suggestions. Will put some in my TODO list, but don't know at all when this is gonna be implemented yet... For the IB and the VA you have some colours on the chart that show them.
-
Possible, although, I think it's more coming from the data you're using rather than from Excel 2007. Maybe you could send me the data you're trying to use so I can check on my version to see if it works?
-
You should look also for the possibility to download historical intraday data as live prices through DDE is not ideal. You could ask their support to help you a bit on that, what you should ask for is a way to download into excel (or somewhere else) todays data (1min bars would be ideal). If possible you'll be able to use the spreadsheet efficiently.
-
Hi, Which version of the spreadsheet do you use? With the latest version of the spreadsheet (version 0.030) you can plot a MP chart throughout the day with no problem (the refresh version doesn't work yet with a merge profile but work well with a split one. Refresh can be done by pressing split and then merge again until I add a fix). I don't understand when you say that cells are not filled, which cells? There is a way to export Tradestation data to a file readable by the spreadsheet so that you'll have an auto refresh possibility. For composite profile: I was thinking of adding that aswell, it won't be too difficult to add but I'm still unclear on which last days will be better to have as a composite profile as I still want to be able to compare today's with a composite one or to compare todays + last week as a composite profile. If you have any suggestions on that I'll be glad to hear them. Thanks
-
Hi bronxterp, I suggest you'll have a look there: http://www.traderslaboratory.com/forums/6/mp-on-excel-1306-8.html the spreadhseet might be useful to you.
-
Do you know if DDE is available with your feed? Not everybody give this possibility? If yes, I think what you would like to do will be quite easy to do in Excel. Let me know.
-
Thanks , I have to say that when I started to work on the spreadsheet I never thought that I could have that... I'm not sure to understand what do you mean by a composite profile or day by day profiles? Thanks
-
Depends if you're a bit confident with VBA or not and if you're following just one symbol there is a way to have a file updated automatically. Or you'll have to enter values manually .
-
Hi, I know that you can access data from a webpage and download it to the spreadsheet with quote.com, I'm not sure on how to do it and I think it's not free. For free data delayed or not I've no idea... For forex it should be easy but for futures?
-
Hi Wow, Unfortunately this isn't free, you must have a bloomberg terminal to be able to do that (I've got one at work)...
-
Unfortunately if you want to do that you would have to program a bit... Excel is not always the best platform to handle realtime datafeeds (Bloomberg offers a download of historical intraday data, this is what I'm using) but it can be done (VBA is not very hard). I think, somedody on this thread is using another datasource which looks to be great for an use with excel, you could try this one?
-
Yes you'll need a data feed for it... I'm using Bloomberg for it but I've done it in a way that you can use any data feed you want but you'll need some work for it (not too much it's just a matter of updating a file every x minutes so not too difficult )... You can input data manually if you prefer yes.
-
Thanks all Shreem: Did you manage to use the spreadsheets? ForJL: Have you unzipped (with Winrar) the file before trying to use it?
-
Hi Shreem, First I would suggest you to move to the latest version of the spreadsheets as I've done some improvements on it and will continue to add features in the future so I think better to use it. Second try to use smaller window of data (from 7 to 17 for example), I tend to not use 24 hours data for currencies and split the day in 3 sessions (depending on the time I trade). If anymore problems let me know and I'll have a closer look. Thanks for the feedback.
-
Hi Shreem, I'm currently away from home (holidays :p) and can't really have a close look to your spreadsheet, I promise I'll have a look as soon as I come back next week.