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

Re: [amibroker] Plotting hollow shape on scaled buys - how to ?



PureBytes Links

Trading Reference Links

Firstly be very careful how you write the Buy condition statements.
If you get Buy==1 and Buy==sigscalein you could very well end up with
Buy==sigscaleout
Remember sigscalein==99998 and sigscaleout==99999

try this exploration and change which Buy statement is used

Buy = (C>Ref(C,-1)) + (C>Ref(C,-2))*sigScaleIn;
//Buy = (C>Ref(C,-2))*sigScaleIn + (C>Ref(C,-1));

//Buy = IIf(C>Ref(C,-1),1, IIf(C>Ref(C,-2),sigScaleIn, 0));
//Buy = IIf(C>Ref(C,-2),sigScaleIn, IIf(C>Ref(C,-1),1, 0));
Filter=1;
AddColumn(C>Ref(C,-1),"C>C1",1);
AddColumn(C>Ref(C,-2),"C>C2",1);
AddColumn(Buy,"buy",1);
AddColumn(sigScaleIn,"In",1);
AddColumn(sigScaleOut,"Out",1);

as above plot the shapes separaqtely, do not combine with a + as in
shape = shapeuparrow*buy + shapehollwuparrow*(buy==sigscalein) because
these are numbers and will be added together if both conditions are
true
use something like this
PlotShapes( shapeUpArrow*(Buy==1), colorGreen, 0, L, -12 );
PlotShapes( shapeHollowUpArrow*(Buy==sigScaleIn), colorGreen, 0, L, -12 );

similarly with sell if you use applystops where sell values are not  ==1

-- 
Cheers
Graham Kav
AFL Writing Service
http://www.aflwriting.com

On 08/02/2008, gmorlosky <gmorlosky@xxxxxxxxx> wrote:
> I want to have a hollow shape on all buys after the first buy when
> scaling in, but since my second buy is designated by BUY = Buy +
> sigScaleIn etc., how do I plot the scaled in buys?
>
> PlotShapes( Buy* shapeUpArrow , buycolor, 0);
> // next line doesn't work.....
> PlotShapes( Buy* shapeHollowUpArrow, buyagaincolor, 0);
> PlotShapes( Sell* shapeDownArrow , sellcolor, 0);
>


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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/