MATLAB Dates on the x - axis (Page 2) - Matlab, R project and Python | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > Matlab, R project and Python

MATLAB Dates on the x - axis
Started:March 19th, 2011 (11:28 AM) by jakfourie Views / Replies:6,410 / 11
Last Reply:June 27th, 2011 (02:55 AM) Attachments:1

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

MATLAB Dates on the x - axis

Old June 1st, 2011, 11:55 PM   #11 (permalink)
Trading Apprentice
Greenville, South Carolina, US
Futures Experience: Beginner
Platform: Matlab
Favorite Futures: Stocks/Options
Posts: 1 since Jun 2011
Thanks: 0 given, 1 received

jakfourie View Post
Do you maybe know of a way I can get a crosshair in my graphs to make it easier to read the price at a coresponding date?

try using the "ginput" function. This function will give you the crosshairs that you are looking for. Further, if you use a script like the following

[x,y] = ginput();

then you can left-click on the chart and the x- and y-values will be saved in the "x" and "y" variables. You end the input by hitting the "Enter" key.

Reply With Quote
The following user says Thank You to fendrfake for this post:

Old June 27th, 2011, 02:55 AM   #12 (permalink)
Trading Apprentice
South Africa
Futures Experience: Beginner
Platform: JSE
Favorite Futures: Stocks
Posts: 7 since Mar 2011
Thanks: 1 given, 1 received

Hi, sorry for the long wait, but I am back to working on my project now, and hope to start trading very soon.

I used the following code to get the data from the plot with the data pointer:

function txt = myupdatefcn(empt, event_obj)
pos = get(event_obj, 'Position');
datevalue = dates(pos(1));

datecol = 1;
datevalue(:,datecol) = datevalue(:,datecol) + datenum('30-Dec-1899');

txt = {['Date:',datestr(datevalue,20)],['Value:',num2str(pos(2))]};
In main when using plot:
dcm_obj = datacursormode(figure(1)); %Data Cursor Updates!!
set(dcm_obj, 'UpdateFcn',@myupdatefcn);
dates are read from the excel file.

Hope this helps someone

Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > Matlab, R project and Python > MATLAB Dates on the x - axis

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does anyone know of a one-stop site for contract expiration dates? Mopaditi Traders Hideout 3 April 10th, 2016 04:07 PM
Changing rollover dates for CL DarrenH Brokers and Data Feeds 57 February 4th, 2015 12:30 PM
InvestorRT axis label coloring Big Mike Investor/RT 3 August 18th, 2011 06:53 AM
Formatting the Y-Axis Fat Tails NinjaTrader Programming 12 January 26th, 2011 05:32 AM
plot reference axis SARdynamite NinjaTrader Programming 1 July 8th, 2010 07:50 AM

All times are GMT -4. The time now is 08:39 PM.

Copyright © 2016 by All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts

Page generated 2016-10-25 in 0.05 seconds with 20 queries on phoenix via your IP