How to add Stop Loss to Cross Back Under System code
Author: rptrader1
Creation Date: 11/24/2011 6:35 PM
profile picture



I tried using the Cross Back Under System strategy.
It gives great results with VXX and VXZ securities,100% Win rate!!
It does well with the index ETFs too - like DIA, SPY.

However, with other stocks and Closed End Funds, some trades result in large losses.
I would like to introduce a stop loss statement, ex.

Position p = LastPosition;
SellAtStop( bar+1, p, p.EntryPrice * 0.95, "5% Stop Loss" );

I do not udnerstand the code well enough to know how to do this.

Can you please help?

The Code is given below:

Please log in to see this code.

profile picture



Since this topic is an unnecessary duplicate, I replied in the original one for everyone's greater convenience:

Cross Back Under

I'll dump this topic later.
profile picture


Thanks Eugene.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).