logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
LongShot  
#1 Posted : Thursday, May 26, 2005 7:24:27 PM(UTC)
LongShot

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/4/2005(UTC)
Posts: 31

I am currently trying to work out a system, and can't seem to get a formula that works for me. My system has pretty reliable signals for entering positions, but it's not too clear on the exits, So, I am trying to formulate like this: GoLongSig: reliable signal to enter Long GoShortSig: reliable signal to enter Short Then, to exit the long position, I use a variety of conditions such as BlueMoon, FredSaysTo, WitchyDay. Also, since the entry signals are reliable, a GoShortSig is also appropriate to close out the long position; I have found that the best action is to delay it a day so that: StopLong:= If(RedMoon OR PatSaysTo OR AbnormalDay OR Ref(GoShortSig,-1), 1, 0); StopShort:= If(BlueMoon OR FredSaysTo OR WitchyDay OR Ref(GoLongSig,-1), 1, 0); Now, I want to define EnterLong, EnterShort, ExitLong, ExitShort, and here it seems to get tricky. EnterLong needs to be defined such that it is OK to follow GoLongSig during BlueMoon OR FredSaysTo OR WitchyDay, since these can happen when there has been no GoShortSig for them to close out. But it needs to be delayed a day IF it is closing out a short position in order to avoid simultaneous long and short positions. I've tried (BarsSince(GoShortSig) < BarsSince(StopShort)) AND Ref(GoLongSig,-1) and various combinations of logical statements I can think of, and I always end up either skipping those times the GoLongSig is causing the delayed short close out, or I end up with double EnterLong signals (Two days in a row), or situations where every signal is delayed a day, etc, etc, but never finding the right combo to do what seems to me to be very simple to conceive, but impossible to implement. I know I am missing something here; This does not seem like a circular logic problem, and I am hoping somebody can point out what it is.
Patrick  
#2 Posted : Thursday, May 26, 2005 9:38:05 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
I think I posted something like that .... Here it is : http://forum.equis.com/v...hp?t=226&highlight=state http://forum.equis.com/v...hp?t=328&highlight=state These should give you some hints :D Patrick :mrgreen:
LongShot  
#3 Posted : Friday, May 27, 2005 11:39:02 AM(UTC)
LongShot

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/4/2005(UTC)
Posts: 31

Thanx Patrick. Now I can go get rich! :D I think the suggestions will be helpful; some of my problems stem from not having enough variables to declare (I'm used to Pascal, VBasic, etc). dc
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.