[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Plotting discrete values?



PureBytes Links

Trading Reference Links

Thanks Graham,
both your solutions work, but this causes a stair stepping effect i.e. the 
value is held & plotted until a new value is inputted. I was trying to plot 
single point values much like a regular line chart but with irregular time 
interval. i.e instead of plotting the close every hour, plot the close only 
at specific time intervals
Thanks again for taking the time to respond.
cheers

----- Original Message ----- 
From: "Graham" <kavemanperth@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, July 04, 2005 11:03 AM
Subject: [trading] Re: [amibroker] Plotting discrete values?


> this may, or may not, work
> xClosed = IIf(TimeNum() >= 090000, ValueWhen (TimeNum() ==
> 090000,C),IIf(TimeNum() >= 190000, ValueWhen (TimeNum() ==
> 190000,C),IIf(TimeNum() >= 030000, ValueWhen (TimeNum() ==
> 030000,C),Null)));
>
> Plot(xClosed, "",colorBlue, styleLine|styleDots);
>
> else you need to be far more specific
> xClosed =
> IIf(TimeNum() >= 090000 and TimeNum() < 190000, ValueWhen (TimeNum()
> ==090000,C),
> IIf(TimeNum() >= 190000 and TimeNum() < 030000, ValueWhen (TimeNum()
> ==190000,C),
> ValueWhen (TimeNum() ==030000,C)
> ));
>
> one thing, if you do not have a bar or value at exactly the timenum
> you may need to write it as
> ValueWhen ( Cross( TimeNum(), 030000 ), C )
>
> the above is typed straight nto here, so may have type errors or
> missing brackets, check
>
>
> On 7/4/05, Steve <avalon-ardy@xxxxxxxxxxxxxxx> wrote:
>> Hi,
>> I'm using the following to plot Close values at certain times.
>>
>> xClosed = IIf(TimeNum() == 090000, ValueWhen (TimeNum() ==
>> 090000,C),IIf(TimeNum() == 190000, ValueWhen (TimeNum() ==
>> 190000,C),IIf(TimeNum() == 030000, ValueWhen (TimeNum() ==
>> 030000,C),Null)));
>> Plot(xClosed, "",colorBlue, styleLine|styleDots);
>>
>> The chart plots the dots Ok, but doesn't plot the line connecting the 
>> dots.
>> I suspect it needs a constant value instead of "Null" if the condition 
>> isn't
>> true.
>> Any suggestions on how I can "join the dots"?
>> cheers




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/