NexusFi: Find Your Edge


Home Menu

 





Trailing stop following an indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one nanobiotech with 3 posts (2 thanks)
    2. looks_two MWinfrey with 3 posts (5 thanks)
    3. looks_3 Big Mike with 1 posts (0 thanks)
    4. looks_4 max-td with 1 posts (0 thanks)
    1. trending_up 4,353 views
    2. thumb_up 7 thanks given
    3. group 3 followers
    1. forum 9 posts
    2. attach_file 1 attachments




 
Search this Thread

Trailing stop following an indicator

  #1 (permalink)
 
nanobiotech's Avatar
 nanobiotech 
Brisbane, Australia
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-Fire
Trading: CL
Posts: 670 since Jun 2009
Thanks Given: 134
Thanks Received: 430

I hope someone can help me as I'm trying to code for a trailing stop in an automated strategy (it's a version of Hurley I'm working on so I can't really post the code here as it's in the Elite section, and it's a little complicated as well).

The indicator is:
_ADXVMA_Alertsv01_5_1_Hurley(adxvmalength1, conmode).Main[0]

I want the trailing stop to equal the value of the above, say 1-2 bars behind price.

If anyone is familiar with the most recent Hurley code perhaps you could post a solution either here or in the Hurley thread? Or send me a private message.

Cheers,
Nano

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Quant vue
Trading Reviews and Vendors
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
REcommedations for programming help
Sierra Chart
What broker to use for trading palladium futures
Commodities
How to apply profiles
Traders Hideout
 
  #3 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335


I think I have it figured out for you. Where do you want me to post it? It's included in your version of the one you think is the best one. I renamed it so you wouldn't have any conflicts.


gee, i can't read...i'll send it to you in a pm.


nanobiotech View Post
I hope someone can help me as I'm trying to code for a trailing stop in an automated strategy (it's a version of Hurley I'm working on so I can't really post the code here as it's in the Elite section, and it's a little complicated as well).

The indicator is:
_ADXVMA_Alertsv01_5_1_Hurley(adxvmalength1, conmode).Main[0]

I want the trailing stop to equal the value of the above, say 1-2 bars behind price.

If anyone is familiar with the most recent Hurley code perhaps you could post a solution either here or in the Hurley thread? Or send me a private message.

Cheers,
Nano


Reply With Quote
Thanked by:
  #4 (permalink)
 
nanobiotech's Avatar
 nanobiotech 
Brisbane, Australia
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-Fire
Trading: CL
Posts: 670 since Jun 2009
Thanks Given: 134
Thanks Received: 430


MWinfrey View Post
I think I have it figured out for you. Where do you want me to post it? It's included in your version of the one you think is the best one. I renamed it so you wouldn't have any conflicts.


gee, i can't read...i'll send it to you in a pm.

Thanks Mike, your changes appear to work nicely. I really appreciate your help

Cheers,
Nano

Started this thread Reply With Quote
  #5 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335


nanobiotech View Post
Thanks Mike, your changes appear to work nicely. I really appreciate your help

Cheers,
Nano


Outstanding...hopefully it will produce the kind of results you are hoping for.

Reply With Quote
  #6 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

hi nano,

is it possible that you post the solution mike created for you ?

or mike, can you post the code you realized this with ?

that would be great + helps lots of folks i think !

thanks in advance !

-

max-td
Reply With Quote
  #7 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,463 since Jun 2009
Thanks Given: 33,237
Thanks Received: 101,661


max-td View Post
hi nano,

is it possible that you post the solution mike created for you ?

or mike, can you post the code you realized this with ?

that would be great + helps lots of folks i think !

thanks in advance !

-

Remember, don't post Elite content in this particular thread as it is not Elite. Original thread subject is an Elite topic, so it can get confusing. This entire thread should probably be moved to Elite in fact.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #8 (permalink)
 
nanobiotech's Avatar
 nanobiotech 
Brisbane, Australia
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus/Zen-Fire
Trading: CL
Posts: 670 since Jun 2009
Thanks Given: 134
Thanks Received: 430


max-td View Post
hi nano,

is it possible that you post the solution mike created for you ?

or mike, can you post the code you realized this with ?

that would be great + helps lots of folks i think !

thanks in advance !

-

I'm working on it but will only post in the Hurley thread in Elite.

Cheers,
Nano

Started this thread Reply With Quote
Thanked by:
  #9 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,335


max-td View Post
hi nano,

is it possible that you post the solution mike created for you ?

or mike, can you post the code you realized this with ?

that would be great + helps lots of folks i think !

thanks in advance !

-

I know you asked Nano but the reason we are working off line is because what nano is doing isn't ready for release but when it is, I'm sure nano will do so in the Elite section.

Mike Winfrye

Reply With Quote
Thanked by:
  #10 (permalink)
peglegtrading
ho chi minh city
 
Posts: 52 since Mar 2011
Thanks Given: 16
Thanks Received: 9


I have been trying to get a trailing stop set for the keltner band but haven't had any luck with metatrader. Does anyone by chance happen to have this set up in their ninjatrader?

Does not open the position but allows you A exit the position on the touch of the opposite keltner from which you entered or B allows you to trail the position (with break even as the first step)

Here is a screenshot from my metatrader attempts.

Attached Thumbnails
Click image for larger version

Name:	alertonopenbutnotexithalf.gif
Views:	347
Size:	22.7 KB
ID:	50837  
Reply With Quote




Last Updated on October 3, 2011


© 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