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

Notification

Icon
Error

Options
Go to last post Go to first unread
reddog  
#1 Posted : Tuesday, August 28, 2007 12:57:04 PM(UTC)
reddog

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/22/2007(UTC)
Posts: 16

I Expert advisor, I'm trying to work out how to relate the entry price from a "buy" signal to the "exit" signal but a variable created from the "buy" signal is not recognised when creating the "sell" signal.

In other words, say I have my buy (long) signal and the price is $10 and I set my initial stop/loss at SL:=9.9

Say in 10 days time the stock has risen and then dropped to $9.80. How do I get my "sell" signal formula to recognise the variable "SL" which was created in the "buy" signal formula?

Thanks

SirShaveKWSN  
#2 Posted : Wednesday, August 29, 2007 6:57:33 AM(UTC)
SirShaveKWSN

Rank: Member

Groups: Registered, Registered Users
Joined: 9/22/2006(UTC)
Posts: 14

Maybe this will help. The following code would set a stoploss of $0.10 below the low of the most recent day on which the BuySignal was generated. How you define whether BuySignal is true or not is up to you.

StopLoss:=ValueWhen(1,BuySignal,Low-0.10);

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.