NexusFi: Find Your Edge


Home Menu

 





Trailing Stop Strat Pivots


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #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?
Feb & Mar24 New Ag Micros & New Solana Crypto Fu …
Traders Hideout
Using multiple Versions of the same DLL in MC.Net
MultiCharts
Historical Price History?
Elite Algorithmic NinjaTrader Trading
My funded futures (mffu)
Funded Trading Evaluation Firms
Multiple Timeframes in One Chart/Strategy
MultiCharts
 
  #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,770


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
  #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
  #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,770

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
  #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
Thanked by:




Last Updated on June 18, 2012


© 2025 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 - Downloads - Top
no new posts