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

Re: [amibroker] PLOTSHAPES problem



PureBytes Links

Trading Reference Links


Hi,
 
You need to either do the following:
 
function fSelectDayAgo( n )
{
return IIf( DateNum()==LastValue(ValueWhen(DateNum()!=Ref(DateNum(),-1), DateNum(), n)), 1, 0);
}
arrSelectedDay = fSelectDayAgo(5);
PlotShapes( IIf( arrSelectedDay, shapeCircle, shapeNone ), colorGreen); // <--this doesn't plot anything
//while this does:
Plot( arrSelectedDay, "PP", colorRed, styleHistogram);
OR
 
Keep your code as is but change the plotshapes line:
 
PlotShapes( IIf( arrSelectedDay, shapeCircle, shapeNone ), colorGreen,0,0,0);
 
PlotShapes needs a ygraph reference.  When you have your plot on styleownscale with no min max range I assume it doesn't know where to plot.  so, you have to add the three extra fields to specify.
 
Hope this helps,
Gary
black_marubozu <black_marubozu@xxxxxxxxx> wrote:
hello everybody,could anybody please explain to me, what I do wrong with this code:function fSelectDayAgo( n ) {      return IIf( DateNum()==LastValue(ValueWhen(DateNum()!=Ref(DateNum(),1), DateNum(), n)), 1, 0);}arrSelectedDay = fSelectDayAgo(1);PlotShapes( IIf( arrSelectedDay, shapeCircle, shapeNone ), colorGreen ); // <--this doesn't plot anything//while this does:Plot( arrSelectedDay, "PP", colorRed, styleHistogram+styleOwnScale);why plotshapes(..) doesn't plot shapes?regards,BMSend BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to suggest@xxxxxxxxxxxxx-----------------------------------------Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard






Yahoo! Groups Sponsor


  ADVERTISEMENT











Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.