Hi guys,
I'm trying to do use the following code in my script to mess around with some other entries and to see what the results end up to
Entry = -(priceLow()-10*PIP);
But I can't really get it to work.
My code looks like this:
int Entryspec()
{
Entry = -(priceLow()-50*PIP);
}
function run()
{
LookBack = 500;
StartDate = 20080101;
EndDate = 20080201;
BarPeriod = 60;
var threshold = 0.5;
vars Price = series(price());
vars Norm = series(Normalize(Price, 50));
if(crossUnder(Norm, threshold))
enterShort(Entryspec);
Stop = 2*ATR(30);
Trail = 50*PIP;
plot("Normalize", Norm[0],NEW,RED);
plot("Thresh", threshold,0,BLACK);
plot("Thresh2", -threshold,0,BLACK);
}
Yet, the system still enters trades where I don't want it to.
See the image for an example:
http://sv.tinypic.com/view.php?pic=dli99d&s=8#.U14if_l_s8oAs you might have guessed, I would like to avoid the whipsaws by setting a stop entry instead of a normal entry. That is, put a stop order 50 pips under current low. Yet, like I said, it still enters som weird trades, for example where I marked in the pictures.
Any advice is appreciated!
Thanks!