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

Notification

Icon
Error

Options
Go to last post Go to first unread
yachtfund  
#1 Posted : Tuesday, July 11, 2006 10:17:26 AM(UTC)
yachtfund

Rank: Member

Groups: Registered, Registered Users
Joined: 5/22/2006(UTC)
Posts: 27

Hi All How do I get the value of the mornings high/low (say between 6 and 9am) on an intraday chart? Many Thanks YachtFund
Jose  
#2 Posted : Tuesday, July 11, 2006 4:04:23 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)
Try this chart indicator: [code:1:b5df1ea03e] ================= Intraday High/Low ================= ---8<------------------------- { Adjustable intraday High/Low. ©Copyright 2004~2006 Jose Silva. The grant of this license is for personal use only - no resale or repackaging allowed. http://www.metastocktools.com } { Time Inputs } StHour:=Input("start Hour",0,23,6); StMin:=Input("start Minute",0,59,0); EnHour:=Input("last Hour",0,23,9); EnMin:=Input("last Minute",0,59,0); { Time period } start:=Hour()>StHour OR Hour()=StHour AND Minute()>=StMin; end:=Hour()<EnHour OR Hour()=EnHour AND Minute()<=EnMin; filter:= start AND (end OR (start AND Alert(start=0,2))); { Start/End time signals } start:=filter AND Alert(filter=0,2); end:=filter=0 AND Alert(filter,2); { Hi/Lo values } Hi:=ValueWhen(1,filter,HighestSince(1,start,H)); Lo:=ValueWhen(1,filter,LowestSince(1,start,L)); { Plot on price chart } Hi;Lo ---8<------------------------- [/code:1:b5df1ea03e] jose '-)
StorkBite  
#3 Posted : Tuesday, July 11, 2006 7:05:06 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)
Hey J! I was trying this one all morning. I thought it'd be simple, but never really came up with a working solution. I looked at your Signal Accumulator code and tried to adapt it, but didn't get far. In the end, this is what I had come up with: [code:1:dac8fc85dc]pd:=Hour()>=6 AND Hour()<10; hv:=If(pd,H,0); lv:=If(pd,L,0); hv;-lv[/code:1:dac8fc85dc] The thing is, that I couldn't trap the highest or lowest, so the values are changing. I even tried to write it to an external variable and couldn't make it work. Anyway, you did a great job as usual. G
Jose  
#4 Posted : Wednesday, July 12, 2006 2:48:49 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)
Thanks, G. Trapping the new Highs/Lows is the easy part - trading them is something else! :) jose '-)
yachtfund  
#5 Posted : Monday, July 17, 2006 10:33:21 AM(UTC)
yachtfund

Rank: Member

Groups: Registered, Registered Users
Joined: 5/22/2006(UTC)
Posts: 27

Thanks Jose How did you say I traded it? :)
Jose  
#6 Posted : Monday, July 17, 2006 10:46:16 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)
Yes, dust off your crystal ball, get it to predict the highs and lows of the day before they happen, and then go Short/Long accordingly. Simple, really... eh? ;) jose '-)
yachtfund  
#7 Posted : Monday, July 17, 2006 3:03:33 PM(UTC)
yachtfund

Rank: Member

Groups: Registered, Registered Users
Joined: 5/22/2006(UTC)
Posts: 27

Jose Im doing a back test and want it to only either buy or sell once a day. How do I limit a test to one of each a day i.e. only one buy and or one sell? Thanks for your help, YachtFund
Jose  
#8 Posted : Monday, July 17, 2006 3:55:07 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)
There are probably an infinite number of ways to limit signals. Post your existing trading strategy code and we'll see what we can do. jose '-)
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.