NexusFi: Find Your Edge


Home Menu

 





Trailing Stop Strat Pivots


Discussion in EasyLanguage Programming

Updated
    1. trending_up 2,570 views
    2. thumb_up 3 thanks given
    3. group 1 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

Trailing Stop Strat Pivots

(login for full post details)
  #1 (permalink)
 
greenroomhoo's Avatar
 greenroomhoo 
annapolis USA
 
Experience: Intermediate
Platform: Ninja, MC, Sierra, Amibroker
Broker: PFG (too bad), IB, Fidelity, AMP
Trading: ES, NQ, Equities, Forex, Etc.
Posts: 276 since Jun 2011
Thanks Given: 107
Thanks Received: 235

has anyone seen code for an easylanguage trailing stop based on pivots. That is the stops move up as each new price pivot is formed?

thanks

Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Futures Close-Out Policy
Commodities
ZombieSqueeze
Platforms and Indicators
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Looking for an MQL4 MetaTrader programmer/coder
The Elite Circle
Request for MACD with option to use different MAs for fa …
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
33 thanks
Daytrading ES & NQ
32 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Retail Trading As An Industry
25 thanks
Battlestations: Show us your trading desks!
24 thanks

(login for full post details)
  #3 (permalink)
 
Nicolas11's Avatar
 Nicolas11 
near Paris, France
 
Experience: Beginner
Platform: -
Trading: -
Posts: 1,071 since Aug 2011
Thanks Given: 2,232
Thanks Received: 1,769


Hi,

It is not so difficult to code by using MultiCharts Pivot.

What is exactly your problem?

Nicolas

Envoyé depuis mon GT-I9100 avec Tapatalk

Visit my NexusFi Trade Journal Reply With Quote
(login for full post details)
  #4 (permalink)
 
greenroomhoo's Avatar
 greenroomhoo 
annapolis USA
 
Experience: Intermediate
Platform: Ninja, MC, Sierra, Amibroker
Broker: PFG (too bad), IB, Fidelity, AMP
Trading: ES, NQ, Equities, Forex, Etc.
Posts: 276 since Jun 2011
Thanks Given: 107
Thanks Received: 235

i probably could figure it out but why reinvent the wheel if someone else already has :-)




Nicolas11 View Post
Hi,

It is not so difficult to code by using MultiCharts Pivot.

What is exactly your problem?

Nicolas

Envoyé depuis mon GT-I9100 avec Tapatalk


Visit my NexusFi Trade Journal Started this thread Reply With Quote
(login for full post details)
  #5 (permalink)
 
Nicolas11's Avatar
 Nicolas11 
near Paris, France
 
Experience: Beginner
Platform: -
Trading: -
Posts: 1,071 since Aug 2011
Thanks Given: 2,232
Thanks Received: 1,769

You could play around
 
Code
if MarketPosition = 1 {currently long} then
   sell next bar at SwingLow(1 {first}, Low, 2 {strength on both left and right sides}, 50 {lookback}) stop;
Nicolas

Visit my NexusFi Trade Journal Reply With Quote
(login for full post details)
  #6 (permalink)
 
greenroomhoo's Avatar
 greenroomhoo 
annapolis USA
 
Experience: Intermediate
Platform: Ninja, MC, Sierra, Amibroker
Broker: PFG (too bad), IB, Fidelity, AMP
Trading: ES, NQ, Equities, Forex, Etc.
Posts: 276 since Jun 2011
Thanks Given: 107
Thanks Received: 235

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;

Visit my NexusFi Trade Journal Started this thread Reply With Quote
The following 3 users say Thank You to greenroomhoo for this post:





Last Updated on June 18, 2012


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts