MATLAB Dates on the x - axis - Matlab, R project and Python | futures io social day trading
futures io futures trading


MATLAB Dates on the x - axis
Updated: Views / Replies:7,266 / 11
Created: by jakfourie Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

Reply
 1  
 
Thread Tools Search this Thread
 

MATLAB Dates on the x - axis

  #1 (permalink)
Trading Apprentice
South Africa
 
Futures Experience: Beginner
Platform: JSE
Favorite Futures: Stocks
 
Posts: 7 since Mar 2011
Thanks: 1 given, 1 received

MATLAB Dates on the x - axis

I am trying to get dates on the x-axis of my plots from Excel. I'v managed to get the dates imported and using serial dates, but I'm having trouble using the 'set gca' commands; here's what I've got:

 
Code
[dates] = xlsread(filename,'Dates',range);
datecol = 1;
dates(:,datecol) = dates(:,datecol) + datenum('30-Dec-1899');
and in another function:

 
Code
global gDates;
dates = gDates(iStart:iEnd);

datestring = datestr(dates, 20);

set(gca, 'XTick', dates);
set(gca, 'XTickLabel', datestring);
but the results are either no x-axis ticks or no plot.

Any help would be appreciated, thank you.

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received



jakfourie View Post
I am trying to get dates on the x-axis of my plots from Excel. I'v managed to get the dates imported and using serial dates, but I'm having trouble using the 'set gca' commands; here's what I've got:

 
Code
[dates] = xlsread(filename,'Dates',range);
datecol = 1;
dates(:,datecol) = dates(:,datecol) + datenum('30-Dec-1899');
and in another function:

 
Code
global gDates;
dates = gDates(iStart:iEnd);

datestring = datestr(dates, 20);

set(gca, 'XTick', dates);
set(gca, 'XTickLabel', datestring);
but the results are either no x-axis ticks or no plot.

Any help would be appreciated, thank you.

Just a disclaimer, my programming knowledge is miniscule. I'm not sure I understand what you're asking here?

Reply With Quote
 
  #4 (permalink)
Trading Apprentice
South Africa
 
Futures Experience: Beginner
Platform: JSE
Favorite Futures: Stocks
 
Posts: 7 since Mar 2011
Thanks: 1 given, 1 received

Basicly what I'm asking is how I can get dates from Excel as my x-axis values.

Reply With Quote
 
  #5 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received


jakfourie View Post
Basicly what I'm asking is how I can get dates from Excel as my x-axis values.

Can you post a copy of the file somewhere?

Reply With Quote
The following user says Thank You to forrestang for this post:
 
  #6 (permalink)
Trading Apprentice
South Africa
 
Futures Experience: Beginner
Platform: JSE
Favorite Futures: Stocks
 
Posts: 7 since Mar 2011
Thanks: 1 given, 1 received

I was finally able to do it with help from here:
http://www.aquaphoenix.com/lecture/matlab8/page3.html

Thanks anyway, I'm sure I'll have more questions later.


Last edited by sam028; March 23rd, 2011 at 06:51 AM. Reason: remove @ spaces
Reply With Quote
The following user says Thank You to jakfourie for this post:
 
  #7 (permalink)
Trading Apprentice
South Africa
 
Futures Experience: Beginner
Platform: JSE
Favorite Futures: Stocks
 
Posts: 7 since Mar 2011
Thanks: 1 given, 1 received

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?

Reply With Quote
 
  #8 (permalink)
Urban Samurai
Chicago IL
 
Futures Experience: Intermediate
Platform: Ninja, MT4,TOS, SC, Matlab
Broker/Data: CQG, AMP, MB, DTN
Favorite Futures: E/U, G/U
 
forrestang's Avatar
 
Posts: 1,039 since Jun 2010
Thanks: 226 given, 688 received

Nice to see you got it to work.


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?

The only way I know how to do this is creating a FINTS object out of the dates and data, and then creating an interactive chart. You can do this with the 'ftstool' command.

Attached Thumbnails
MATLAB Dates on the x - axis-prime2011-03-20_105402.jpg  
Reply With Quote
The following user says Thank You to forrestang for this post:
 
  #9 (permalink)
Trading Apprentice
South Africa
 
Futures Experience: Beginner
Platform: JSE
Favorite Futures: Stocks
 
Posts: 7 since Mar 2011
Thanks: 1 given, 1 received

Ok, thank you.

I've played around with the ftstool a bit, but I'm trying to create a program that does a set of technical analyses on a share and tells you where possible buy/sell points are.

Reply With Quote
 
  #10 (permalink)
Elite Member
Neubrandenburg, Germany
 
Futures Experience: Advanced
Platform: R
Favorite Futures: Stocks
 
wh's Avatar
 
Posts: 538 since Jun 2009
Thanks: 297 given, 480 received


look here: Financial Scripting With FreeMAT/MATLAB: Visualization Script

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Causality is the relationship between an event (the cause) and a second event (the effect), where the second event is a consequence of the first.
Reply With Quote
The following 3 users say Thank You to wh for this post:

Reply



futures io > > > > 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)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

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 05:07 PM
Changing rollover dates for CL DarrenH Reviews of Brokers and Data Feeds 57 February 4th, 2015 01:30 PM
InvestorRT axis label coloring Big Mike Investor/RT 3 August 18th, 2011 07:53 AM
Formatting the Y-Axis Fat Tails NinjaTrader Programming 12 January 26th, 2011 06:32 AM
plot reference axis SARdynamite NinjaTrader Programming 1 July 8th, 2010 08:50 AM


All times are GMT -4. The time now is 08:57 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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 2017-12-18 in 0.12 seconds with 20 queries on phoenix via your IP 107.20.115.174