Stale Exit – Ambroker | Aussie Stock Forums

<iframe src=”//rcm-na.amazon-adsystem.com/e/cm?o=1&p=22&l=ur1&category=homegarden&banner=02NMTC702K4D0VHE1SR2&f=ifr&linkID=17e0b4ac3a719000706e772761d8ae0e&t=forexz-20&tracking_id=forexz-20″ width=”250″ height=”250″ scrolling=”no” border=”0″ marginwidth=”0″ style=”border:none;” frameborder=”0″></iframe>

I am trying to code a stale exit. My code thus far is:

Code:

Stale = 20;
StaleStop = ROC(C, Stale) < 0;
Sell = SellingCross OR StaleStop;

I still have a trailing stop that will trigger as well.

My current issue is that I am having my new positions exited too prematurely. I would prefer that my system will check after 20 bar’s if the ROC is < 0, whereas at the moment the statement ROC(C, 20) is checked periodically so it sells after only a few bars which makes the trailing stop almost pointless.

 

Be the first to comment

Leave a Reply

Your email address will not be published.


*


+ 41 = 47