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

Re: Scaling Out of Positions



PureBytes Links

Trading Reference Links


> I can't seem to persuade EasyLanguage to let me scale out of positions.
> 
> I know there have been some other, similar posts on the O-List recently
> but I'm not making the mistake of trying to partially-exit a given signal
> so I don't think the advice previously given applies. Here's a quick idea
> of what I'm trying to do.
> 
> My system will make up to, say, 10 buys each of 1-lot when certain
> conditions are fulfilled on consecutive days. All buys derive from one
> entry signal (i.e. I haven't coded a Buy("Buy#1") and a Buy("Buy#2") etc
> in the system). If subsequently some of the conditions are no longer
> fulfilled, the system is supposed to gradually exit any open positions -
> until it is flat again, up to 10 days later.
> 
> What actually happens is that as soon as the system encounters either an
> "ExitLong" or a "Sell" instruction, it exits all open long positions. 

SELL - means go NET SHORT - so TS is doing right, but not what you want :-)

try: EXITLONG 1 contract TOTAL


hope that helps

rgds hans

PS: you might like to join THE CODE LIST, where such and other interesting 
things are frequently discussed - also no shoot outs, wars and baseballbat attacks

subscription information location
http://www.markbrown.com/list.htm




I
> don't want to hard-code a partial-exit of each position (e.g. buy having
> it buy 10 lots each time then sell 1 lot on a partial exit) since this
> could get complicated to figure out what open positions are left.
> 
> Do I need to code 10 separate but very similar Entry and Exit signals,
> along the lines of a nested "if open_position=1 then Buy("Buy#2") at
> market" etc or is there an easier way? I tried entering formulaic
> (string-based) names in the name of the signal but ELA doesn't like that!
> 
> Thanks
> 
> Rus Newton
> 
> 
>