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

Notification

Icon
Error

Options
Go to last post Go to first unread
stockfinder  
#1 Posted : Friday, July 29, 2005 8:12:51 PM(UTC)
stockfinder

Rank: Newbie

Groups: Registered, Registered Users
Joined: 7/29/2005(UTC)
Posts: 1

I'm trying to code this but need some help. "Buy as soon as the price goes above yesterday close. Sell ass soon as theprice goes below the low of last 4 days. Hope you can help me. thanks
zalakinc  
#2 Posted : Saturday, July 30, 2005 3:38:32 AM(UTC)
zalakinc

Rank: Newbie

Groups: Registered, Registered Users
Joined: 6/19/2005(UTC)
Posts: 6
Location: Indianapolis,IN

explorer or system tester??
wabbit  
#3 Posted : Saturday, July 30, 2005 6:05:13 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
MS EOD or MS Pro (intra-day?) wabbit :D
Jose  
#4 Posted : Saturday, July 30, 2005 7:10:10 AM(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)
stockfinder wrote:
Sell ass soon as theprice goes below the low of last 4 days.
I dunno... selling one's ass doesn't seem like a good idea to me. I would try selling the wife and children before selling the farm's valuable donkey. :lol: jose '-)
Jose  
#5 Posted : Saturday, July 30, 2005 7:16:48 AM(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)
Ok, try this for EOD charts: buy:=H>Ref(C,-1); sell:=L<Ref(LLV(L,4),-1); [code:1:d05fee02d8] ==================== System trade signals ==================== ---8<-------------------------- { System trade signals v2.5 } { ©Copyright 2005 Jose Silva } { For personal use only } { http://www.metastocktools.com } { Note on simultaneous entry/exit on same bar: #1 Ignore: entry/exit signals cancel each other; #2 Preference given to: new entry if currently Short, new exit if currently Long.} { Signals reference example } entry:=H>Ref(C,-1); exit:=L<Ref(LLV(L,4),-1); { User inputs } plot:=Input("Signals: [1]Clean, [2]All, [3]Trade binary",1,3,1); choose:=Input("Simultaneous entry/exit: [1]Ignore, [2]Preference",1,2,2); delay:=Input("Entry and Exit delay",-1,5,0); { Initialize } Init:=Cum(IsDefined(entry+exit))=1; { #1 - Ignore entry/exit on same bar } bin1:=ValueWhen(1,entry-exit<>0 OR Init, entry-exit); long:=bin1=1 AND (Alert(bin1<>1,2) OR Init); short:=bin1=-1 AND (Alert(bin1<>-1,2) OR Init); signals1:=long-short; { #2 - Preference to first entry/exit } long:=entry AND (Alert(entry=0,2) OR Init); short:=exit AND (Alert(exit=0,2) OR Init); bin2:=ValueWhen(1,long-short<>0 OR Init, long-short); long:=bin2=1 AND (Alert(bin2<1,2) OR Init); short:=bin2=-1 AND (Alert(bin2>-1,2) OR Init); signals2:=long-short; { Select #1 or #2 } binary:=If(choose=1,bin1,bin2); signals:=If(choose=1,signals1,signals2); { Plot in own window } Ref(If(plot=2,entry,0),-delay); Ref(If(plot=1,signals, If(plot=2,-exit,binary)),-delay) ---8<-------------------------- [/code:1:d05fee02d8] jose '-) http://www.metastocktools.com
Users browsing this topic
Guest (Hidden)
Similar Topics
How to code muliple entry and exit on System Tester? (Formula Assistance)
by oem7110 4/24/2016 1:03:23 AM(UTC)
Entry and Exit Trade Efficiencies in the Enhanced System Tester (MetaStock)
by towcobra 12/20/2009 7:22:12 AM(UTC)
Timed Entry and Exit [RESOLVED] (Formula Assistance)
by Doug 6/29/2005 12:07:13 PM(UTC)
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.