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

Notification

Icon
Error

Options
Go to last post Go to first unread
hayseed  
#1 Posted : Friday, April 7, 2006 2:45:15 AM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

well i've just about exhausted all known avenues here.... so figured i'd ask for help..... if we think of a normal smooth buy, sell, sell short, buy to cover flow of orders, that is easy to code using the style of the equis chande momentmum oscillator expert..... thats a neat form btw... very useful in most all situstions.... but say our 'sell short' was stopped out.... then later another 'sell short' was triggered by our rules..... can someone think of a coded way to ignore that 2nd 'sell short'.... so once the sell short was stopped out, the next trade would be another buy order..... this would keep you from looping thru loosing sell short trades only to be stopped out when your indicator was in divergence to the price..... some simple trade rules for example; buy=stoch(5,3)<10 sell=stoch(5,3)>70 sell short=stoch(5,3)>80 buy to cover=stoch(5,3)<30 i'm sure you can see how the sell short rule could be triggered several times only to be stopped out again and again...... seems like patrick posted something along that line but can't seem to find it..... any thoughts?...... thanks.....h
mstt  
#2 Posted : Friday, April 7, 2006 3:11:25 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi H I would have thought that using a latch to set on Buy and reset on Sell Short was all that was needed. This should force you to alternate long and short even if they are not synchronous (how do you spell that?). You might need to add a bit of trickery but that's where I'd start anyway. Regards Roy
hayseed  
#3 Posted : Friday, April 7, 2006 3:20:32 AM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey roy thanks.... i'll start looking thru your news letters for the latch ones.... kinda got hung up trying to use the cmo expert form style and also barssince.... thanks.....h
Jose  
#4 Posted : Friday, April 7, 2006 6:23:38 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Hey Hayseed (couldn't resist), :) You could also try something like this: [code:1:591c728ebd] { Combined Long & Short signals v2.2 +0.5 signal = Short entry -0.5 signal = Short exit +1 signal = Long entry -1 signal = Long exit Do not trade these signals - code example only. ©Copyright 2005 Jose Silva. For personal use only. http://www.metastocktools.com } { Display selection } plot:= Input("Signals: [1]Clean, [2]All", 1,2,1); { Indicator } x:=Stoch(5,3); { Long } entry:=x<10; exit:=x>70; LongAll:=entry-exit; { Remove ghost Long signals } init:=Cum(IsDefined(entry+exit))=1; bin:=ValueWhen(1,entry-exit<>0 OR init,entry); entry:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1); exit:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1); long:=entry-exit; { Short } entry:=x>80; exit:=x<30; ShortAll:=entry-exit; { Remove ghost Short signals } init:=Cum(IsDefined(entry+exit))=1; bin:=ValueWhen(1,entry-exit<>0 OR init,entry); entry:=bin*(Alert(bin=0,2) OR entry*Cum(entry)=1); exit:=(bin=0)*(Alert(bin,2) OR exit*Cum(exit)=1); Short:=entry-exit; { Plot in own window } If(plot=1,Short,ShortAll)*.5; If(plot=1,Long,LongAll) [/code:1:591c728ebd] jose '-)
hayseed  
#5 Posted : Friday, April 7, 2006 7:57:00 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey jose.... thanks for not resisting..... will try it immediately ..... in 15+ years of internet posting's on countless sites i've only asked for help a few times..... was desperate here.... thanks again.....h
StorkBite  
#6 Posted : Friday, April 7, 2006 9:07:25 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Quote:
i've only asked for help a few times
I worked with a person once that used to say "Call me if you need me, but if you do it's a sign of weakness." Gosh, how funny... and absurd. As a former teacher, I was taught that teachers ask about 80 questions an hour, whereas students ask about 2. You've taught me more than most when it comes to trading. H, you're the man! There's a point to this somewhere... :)
hayseed  
#7 Posted : Friday, April 7, 2006 11:33:12 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey g... it gets funnier still... this isn't really for me it's for some people i was tryin to show how good metastock was..... had'em sold till the stopping out issue beat me....... you should have seen me tryin to read some of those russian, german and arabic metastock sites lookin for the answer..... even google couldn't read some'em ..... and yep, i got some funny ways....thats all part of bein' a hayseed.....h
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.