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

[amibroker] Help with valuewhen and trough:



PureBytes Links

Trading Reference Links

Hi All...

I want to set my initial hard stop at the second last
pivot point low using the Trough function.

This is what I have tried:

buy = whatever;

initialStop = valuewhen(buy,trough(L,0.5,2),1);

sell = cross(initialStop,close);

when I test this on an individual stock to check the
exits I find this is not as expected.
I get sell arrows when the close has NOT crossed the
value of initial stop.

I want the value of the second last trough at entry to
stay FIXED.

Where am I going wrong?

How can I code this?

Regards

ChrisB



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/