Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/23/2010(UTC) Posts: 60
|
I'd like to plot "Buy Stops" only after "Buy Signals" are generated, and conversely plot "Sell Stops" only after "Sell Signals" are generated. "Buy Signals" would plot "Buy Stops", until a "Sell Signal" replaces it with a "Sell Stop" and visa versa. I know I could plot both Buy & Sell Stops all the time, but I'd rather selectively plot them. Is it possible to conditionally plot them?
"Buy signal" = Cross(A,B)
"Sell signal" = Cross(B,A)
Thank's,
Dennis
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
"Buy signal" = Cross(A,B); "Sell signal" = Cross(B,A); A>B and C>Long stop; A<B and C<Short Stop;
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/23/2010(UTC) Posts: 60
|
Let me restate my question:
I generate Buy & Sell arrows in the Expert Advisor with a formula that evaluates momentary conditions. Once a Buy Arrow is generated and the momentary condition that generated the arrow is gone, I want the Long Stop that was generated by the Buy Arrow conditions to remain plotted until another Arrow is generated. Each time a new Buy or Sell Arrow is generated, the Stop is switched accordingly to match the Arrow Direction, Long or Short. There will always be Stops plotted, Long Stops plotted after a Buy Arrow, and Short Stops plotted after a Sell Arrow. Each new Arrow will either keep the current trade direction or reverse it with the Stops following the direction of the Arrows.
Thank's
Dennis
|
|
|
|
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)
|
There is a multitude of ways to achieve what I think you're trying to achieve, although to get the optimum solution you will have to provide a lot more information.
What timeframes are you trading? How "momentary" are your signals? Is your expert using :live bars"? What .dlls do you have already?
wabbit [:D]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
If(A>B,longstop,shortstop);
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/23/2010(UTC) Posts: 60
|
I'm using daily bars. EOD data.
I'm using the Forum20 DLL.
My Buy & Sell signals are generated by "Cross" functions in the Expert Adviser.
Buy Condition : Cross(A,B) And C And D = 1
Sell Condition : Cross(B,A) And E And F = -1
Supose I had a toggle where the "Buy" condition generates a +1 value to be maintained until a "Sell" condition toggles it to -1, to be maintained until another "Buy" toggles it back to +1. From that, could I plot Long Stops when the toggle = +1 and Short Stops when the toggle = -1? Multiple successive "Buy" signals just maintain the Long Stops and visa versa.
Thank's
Dennis
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
Long:=A>B and C>Long stop; Short:=A<B and C<Short Stop; Signal:=Long-short; Signal
Are you trying to keep up?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/23/2010(UTC) Posts: 60
|
Henry,
What is "C" in your equation?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 5/18/2012(UTC) Posts: 4
|
did you ever find out how to plot buy and sell arrows that persist on the chart? i'm interested in the same thing.
|
|
|
|
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.