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

Notification

Icon
Error

Options
Go to last post Go to first unread
mambapoker  
#1 Posted : Thursday, January 10, 2013 5:25:25 AM(UTC)
mambapoker

Rank: Newbie

Groups: Registered, Registered Users
Joined: 1/10/2013(UTC)
Posts: 4

am currently using Meta v11 .... is there a way to build a simulation function?
or if any1 knows the answer to the following:

I am a trend follower and I use two kind of stop losses:
cumulative, if met the market is not re-entered
trailing, if met the position is closed and the market should be re-entered

I can not code the re-enter condition once a trailing stop is triggered .....

basically once i buy, if a movement against the trend of a certain amount occurs, the position is closed, however if a new max is printed as settlement price since the buy signal, then I want to buy again.... consideration are reversed for a sell short kinda trade





wabbit  
#2 Posted : Thursday, January 10, 2013 4:12:19 PM(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)
If you've made the setting the EST can only have one open trade at a time, then you can monitor for the highest price since the LONG trade was opened... if the LONG trade is opened and the price increases and then retraces, the retracement stop will exit the position, but the system entry rules will continue looking for the trade opportunity, which occurs when a new high is made. Opposite for SHORT trades.


wabbit [:D]

mambapoker  
#3 Posted : Friday, January 11, 2013 3:49:01 AM(UTC)
mambapoker

Rank: Newbie

Groups: Registered, Registered Users
Joined: 1/10/2013(UTC)
Posts: 4

wabbit,

thanks for the answer, I apology I haven't been very clear in my post

the go long criteria and the re-enter criteria are different. To give you a better picture

buy (open long)
cross(mov(c,60,e), mov(c,250,e))

sell (close long)
log(c,ref(c,-1))<-2*stdev(10)

when the sell (close long) condition is met, I would need a conditional buy that checks whether a new settlement price goes through the highest closing price since the buy (open long) condition was met.

and yes my EST is set such that I can hold multiple position, and actually this lead to another problem of mine. I have pyramiding conditions ( I buy more when the up trend is clear and sound), the additional purchases are not closed all at once: if I am long 3 futures, the position is flattened whenever the sell (close long) condition is met 3 times in a row.... I would like the position flattened when the sell (close long) is met the first time .......

thanks







wabbit  
#4 Posted : Sunday, January 13, 2013 7:03:09 PM(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)
You have an intial entry condition and then some pyramiding entry conditions, all trades being exited on the exit trigger; so you can still program the re-entry on a new CLOSE > Ref(HighestSince(1,initialEntry,CLOSE),-1) and then pyramid from there, or have I misunderstood entirely?

If you're having trouble coding this logic for the EST, have a look at the MDK and consider programming the entire logic outside of MS.



wabbit [:D]

mambapoker  
#5 Posted : Tuesday, January 15, 2013 1:00:28 PM(UTC)
mambapoker

Rank: Newbie

Groups: Registered, Registered Users
Joined: 1/10/2013(UTC)
Posts: 4

m8 .... what can i say??? yu are a superstar!!!!
Users browsing this topic
Guest (Hidden)
Similar Topics
MetaStock 12 - System Tester - Simulation Function Errors (Error Messages)
by RTLiberty 10/2/2013 8:40:05 AM(UTC)
The Main Problem: Simulation functions prevent System Tester entering positions (Formula Assistance)
by analias 8/4/2009 1:54:00 PM(UTC)
Simulation Functions (Formula Assistance)
by Avvenire 2/8/2007 3:01:19 AM(UTC)
Simulation function slows System Tester to a crawl (MetaStock)
by optionguy 10/3/2005 6:28:09 PM(UTC)
Simulation Functions [RESOLVED] (Formula Assistance)
by dieselpr 9/8/2005 7:33:25 PM(UTC)
Simulation Functions in System test as Data Arrays (Formula Assistance)
by Gerrit 4/24/2005 7:18:00 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.