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

Notification

Icon
Error

Options
Go to last post Go to first unread
CN001532  
#1 Posted : Tuesday, September 27, 2005 3:12:24 PM(UTC)
CN001532

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/22/2005(UTC)
Posts: 30

I'd like to be able to set a sell stop above 2 pips of the price high whenever a sell signal is triggered from an indicator. Jose Silva's web site www.metastocktools.com has an excellent snippet of code "pip detector" that returns the minimum pip for a security. It's useful for just this function: - set the stop when the current bar's high exceeds the last bar's high by more than 2 pips, H > (ref(h,-1))+((2* Fml("pip dedector")))) If I use the valuewhen function, in place of (ref(h,-1) I can find the price high when the indicator most recently triggered. However, this would limit my ability to backtest. I'd like to be able to set an exit rule in my expert, or within a custom indicator that uses a "two pip" stop whenever the indicator was triggered. is that possible?
CN001532  
#2 Posted : Tuesday, September 27, 2005 10:42:50 PM(UTC)
CN001532

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/22/2005(UTC)
Posts: 30

duh - major brain cramp IF statement should do the trick IF(fml = 1, H,0) then add the 2 pips from Jose's pip detector - which I am still most impressed with -
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.