Hi, I have a hugge problem putting lines in a graph when programming
My graph has as y axis, numbers and as X axis, dates. Thus is the code i'm using:
grafico_overbought.draw(line,bottom, color(red)) "here I have to put the date"
when doig this, it allows me to make a red vertical line fro the x axis, however I need to do this for certain dates that follow a condition. I have a series object call "date" that contains the dates i'm using. My code is
For !t=1 to @obsrange
If rsi_gold(!t) > 70 then
grafico_overbought.draw(line,bottom, color(red)) date(!t)
endif
Next
If I put the date directly, for example 2/12/2008 (spanish format of the date) , the code works. but if I try to use a variable, the code runs, but it does not make the red lines. I've tried with everything, @makedate, @dateval, @datestr and all kind of date functions, but i does not work and I do not know what is wrong.
I will appreciate very much your help, thanks in advance!!
Putting lines in a graph
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13605
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Putting lines in a graph
Try:
Code: Select all
For !t=1 to @obsrange
If rsi_gold(!t) > 70 then
%date = @datestr(date(!t))
grafico_overbought.draw(line,bottom, color(red)) %date
endif
Next
Who is online
Users browsing this forum: No registered users and 2 guests
