Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- discounts are available after registering.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
you shamed me into it. here is the language i came up with that seems to be working just fine. LongPivotStop and ShortPivotStop variables need to be intrabarpersist types when defined in your code.
//Long Stop Language
Condition3 = PivotLowVSBar( 1, Price, LeftStrength, RightStrength, RightStrength + 1 ) <> -1 ;
if marketposition = 0 and condition3 then longpivotstop = Price[LeftStrength];
if marketposition = 1 and condition3 and Price[Leftstrength]>Longpivotstop then LongPivotStop = Price[LeftStrength];
if marketposition = 1 then begin
Sell ( "Pivot LX" ) next bar at LongPivotStop stop;
end;
//Short Stop Language
Condition4 = PivotHighVSBar( 1, Price, LeftStrength, RightStrength, RightStrength + 1 ) <> -1 ;
if marketposition = 0 and condition4 then shortpivotstop = Price[LeftStrength];
if marketposition = -1 and condition4 and Price[Leftstrength]<shortpivotstop then shortPivotStop = Price[LeftStrength];
if marketposition = -1 then begin
Buytocover ( "Pivot SX" ) next bar at shortPivotStop stop;
end;