NexusFi: Find Your Edge


Home Menu

 





Trailing Stop Strat Pivots


Discussion in EasyLanguage Programming

Updated
    1. trending_up 2,586 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

  #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?
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Better Renko Gaps
The Elite Circle
Deepmoney LLM
Elite Quantitative GenAI/LLM
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
38 thanks
NexusFi site changelog and issues/problem reporting
27 thanks
GFIs1 1 DAX trade per day journal
19 thanks
The Program
18 thanks
  #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
  #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,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
  #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


© 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