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
|
|
|
|
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]
|
|
|
|
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
|
|
|
|
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]
|
|
|
|
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)
|
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.