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

[amibroker] Re: Question on ValueWhen usage



PureBytes Links

Trading Reference Links

Hi Thomasz,

Exactly.  I want to have a 10% pullback off the high as a condition of
buying.  Your method is much more elegant in its simplicity than what
I tried to do.  I over complicated it I guess but still don't quite
see why it doesn't work.  I'll look again based on your comment.

OT and I know you don't like these posts here.  Just wanted to let you
know I looked over your site yesterday wondering if you had done
anything with other pattern testing like double bottoms, tops, etc. as
someone had requested.  Hope you haven't given up on that.  I'll be a
repurchaser if you get that up.  If you want to respond to that on
your site, I'll check.

Thanks again for your help. 

Mo.


--- In amibroker@xxxxxxxxxxxxxxx, "Thomas Z." <tzg@xxx> wrote:
>
> Hello,
> 
> basically your code checks if current close is < than current close. 
> Therefore you can't receive buy signals.
> 
> Not sure what you are trying to code, but probably you want to buy
when the
> close is 10% below the highest close from the last 250 bars.
> The following code would do this:
> 
> 
> HC = ValueWhen(C == HHV(C, 250), C);
> Buy = C < 0.99 * HC; // Buy if close dropped down by 10% from
Highest Close
> 
> Plot(C, "Close", colorBrown, 128);
> Plot(HC, "HC", colorPaleGreen, 1);
> PlotShapes(Buy * shapeUpArrow, colorGreen, 0, L, -12);
> 
> 
> Kind regards
> Thomas Zmuck
> www.patternexplorer.com
> 
> 
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
On Behalf
> Of mo_means_go
> Sent: Wednesday, January 02, 2008 10:52 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Question on ValueWhen usage
> 
> I have the following pullback test for a buy:
> 
> Buy_Requirement = IIf ( C < 0.90 * ValueWhen ( C > Ref ( HHV ( C, 250
> ), -1 ), C), 1, 0 );
> Buy = Buy_Requirement == 1;
> 
> I am not generating signals. Am I using this incorrectly for what I'm
> trying to accomplish? Any help would be appreciated.
> 
> Thanks,
> 
> Mo
>




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/