Rank:: Newbie
Groups: Registered, Registered Users Joined: 11/11/2006(UTC) Posts: 2 Location: Auckland, New Zealand
|
Hi
I'd like a bit of help with a system test I'm working on.
I need to be able to set the sell order (or buy to cover order) to a profit target based on the high or low of a previous gap day. This is what I would like to do, but it won't let me use a variable to set the number of periods in Ref().
GapDay:= BarsSince( GapUp() OR GapDown() );
{ Order Limit }
Ref( High, -GapDay )
Any ideas are gratefully received.
I've seen reference to Global variables (gv.dll). Perhaps that would let me set the targte value at the time the gap day occured, but don't know how to get gv.dll.
Cheers
Tony [:)]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/16/2005(UTC) Posts: 93 Location: Maryland,US
|
I have not used the gv.dll. I use the forum.dll which is in the files section of this board. Its free, works great, and has variable refrence. GapDay:= BarsSince( GapUp() OR GapDown() ); TheHigh:=ExtFml("forum.REF",H,GapDay); I posted a question about referencing using BarsSince, Jose said that might create problems. His reply is here: http://forum.equis.com/f...09/ShowThread.aspx#21809
|
|
|
|
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)
|
You might also find the ValueWhen() function useful here:
GapDay:=GapUp() OR GapDown(); hi:=Valuewhen(1,GapDay,H);
etc
Hope this helps.
wabbit [:D]
|
|
|
|
Rank:: Newbie
Groups: Registered, Registered Users Joined: 11/11/2006(UTC) Posts: 2 Location: Auckland, New Zealand
|
Thanks for your very quick responses [:)]
I have tried the ValueWhen() function and it works a treat. (I feel silly that I didn't think of it myself really.)
Thanks again
Tony
|
|
|
|
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.