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

Notification

Icon
Error

Options
Go to last post Go to first unread
CrazyHorse  
#1 Posted : 13 years ago
CrazyHorse

Rank: Member

Groups: Registered, Registered Users
Joined: 2/10/2012(UTC)
Posts: 11

Hi all, I have a problem using a defined amount of days in the orders expiration option of the system tester. I see the 2 options are 'good for one day' and 'good until cancelled'. Is there a way to set the orders so that they stay valid for example for 4 days only? For example determining when the 'good until cancelled' function should cancel the order ^^ thank you very much to all who read this :) Cr@zyhorse
mstt  
#2 Posted : 13 years ago
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 CrazyHorse

I find that the most effective way around this sort of problem with MetaStock is to change my perspective so that my view of market activity is always based on the present and past activity rather than on what might hapen in the future. Another way of putting it is that I build my MS code around what's real, not future possibilities. In your example this would mean generating a Good for Day order when ALL conditions are TRUE, and never using the Good until Cancelled option.

There are a number on "looking into the future" issues with MetaStock that can and will create problems, and in my experience having a perspective of operating in the present and only using past and current activity to make decisions on circumvents almost all of them.

There may be a way to do what you want with the EST but for the most part using your code to solve the problem is going to be the most productive route to solve this and many other perceived problems with any and all MetaStock tools.

This simple concept provided a Eureka moment for me but it may well be a worthless rambling for you. Good luck whichever path you choose.

Roy
jjstein  
#3 Posted : 13 years ago
jjstein

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/13/2005(UTC)
Posts: 715
Location: Midwest, USA

Was thanked: 1 time(s) in 1 post(s)
Roy -- Perhaps another way of saying that would be:

Code:
Entry:={whatever your signal is};

Sum(Entry>0,4)>0; { anytime in the last four bars }



wabbit  
#4 Posted : 13 years ago
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)
Easier again?
Code:
Entry:={whatever your signal is};
Alert(Entry,4)



wabbit [:D]

CrazyHorse  
#5 Posted : 13 years ago
CrazyHorse

Rank: Member

Groups: Registered, Registered Users
Joined: 2/10/2012(UTC)
Posts: 11

Ty to both of you, your idea is perfect! Wabbit, for the principle of not refering to the future in codes or trading system rules i totally agree, but i found that my system is statistically succesfull leaving the entry valid (if the stop is not met in the meanwhile) for more than one bar after the signal bar. So I thaught it would be good to leave the order valid for more than one day, to maximize trading opportunities^^ thanks again for the codes :)
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.

information You have 1 unread message(s) in your Inbox.