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

Re: scaling contracts in and out???



PureBytes Links

Trading Reference Links

> here's my experiment with bollinger bands, can get the first order
> and the exit but not the scale in 

Probably because of the way you're using MP:

> Variables:  BBTop1(0), BBBot1(0),
>    BBTop2(0), BBBot2(0),
>    MP(marketposition);

That INITIALIZES MP to the value of MarketPosition at the START 
of the system.  Which, by definition, will be 0.  It NEVER 
changes it again.

> If  MP=0 and Close <= (1-outside)*BBBot2 then
>    Buy ("BB2")1 contract next bar at market;

You buy in here just fine...

> If   MP=1 and Close crosses over BBBot1 then

...but this one never succeeds because MP is always 0.

Try adding "MP = MarketPosition" at the start and I suspect it 
will work a bit better.

I'm confused, though, why your GIF shows the first BB2 entry 
where it does.  Looks to me like the Close is well outside the 
BBBot2 long before you go long.  I don't have my TS on this 
system so I'm just eyeballing it, so maybe the Close really 
doesn't get more than "Outside" out of the BBands.

Gary

> If  MP=2 and Close crosses over BBtop1 then Exitlong ("XBB1")1
> contract at BBbot1 stop; 

MP is NEVER 2.  Even if you set it to MarketPosition.  
MarketPosition can only take the values -1, 0, and 1.

Gary