Posted By: ibra
Using different entry - 04/29/14 07:59
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
But I can't really get it to work.
My code looks like this:
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_s8o
As 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!
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
Code:
Entry = -(priceLow()-10*PIP);
But I can't really get it to work.
My code looks like this:
Code:
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_s8o
As 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!