NexusFi: Find Your Edge


Home Menu

 





kind of automatic trailing stop


Discussion in NinjaTrader

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




 
Search this Thread

kind of automatic trailing stop

  #1 (permalink)
 andreas 
Stuttgart, Germany
 
Experience: Master
Platform: Tradestation, Jigsaw
Broker: TS Brokerage / InteractiveBrokers / Rithmic
Trading: ES, TF, NQ, Stocks
Posts: 21 since May 2010
Thanks Given: 23
Thanks Received: 21

i am looking for a trailing stopwhich does trail 2 ticks above the high of the previous n bars and which could be enabled or disabled.

thing is, i want to enter the trades manually (DoM/Charttrader), get out at x ticks with the first and it should then trail the second half of the contracts automatically.

do you guys have an idea where i could start searching? i have googled all over the internet and couldnt find anything which would work with manual trading involved...

thanks,
andreas

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
Futures True Range Report
The Elite Circle
Build trailing stop for micro index(s)
Psychology and Money Management
Exit Strategy
NinjaTrader
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
 
  #2 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


andreas View Post
i am looking for a trailing stopwhich does trail 2 ticks above the high of the previous n bars and which could be enabled or disabled.

thing is, i want to enter the trades manually (DoM/Charttrader), get out at x ticks with the first and it should then trail the second half of the contracts automatically.

do you guys have an idea where i could start searching? i have googled all over the internet and couldnt find anything which would work with manual trading involved...

thanks,
andreas

@andreas: First of all your question is not clear to me. A trailing stop that trails 2 ticks above the high of the previous n bars. Are you talking about a short position? I am not sure what you want to achieve.

The standard procedure - which is not necessarily the best - would be to enter a position, define a profit target and an initial stop for the first half of the position, and then have the second position trailed (without profit target) by adjusting the initial stop. This is typically done via a Chandelier Stop, that is the trailing stop for a long position will be adjusted, when a new high is made.

The standard procedure has been implemented with the ATM feature if NinjaTrader.

Now, if you have any other - so far obscure - method to trail you second position, then you would have to explain it here. I did not get it from your description.

In this case two other options would be available.

(1) Code an indicator that exits all positions, when the trailing stop is hit. Attention: Exiting all positions means exiting all strategies across all accounts, as this is what the NinjaScript method does, which can be used in an indicator.

(2) Code a strategy, which is used to open and exit your positions. For opening a position via that strategy, you would have to code an add-on with separate buttons to enter the position via a market or limit order. When the strategy is activated the buttons appear somewhere on the panel. Once you hit the button the strategy will enter the position and take care of your profit target and trailing stops.

Reply With Quote
  #3 (permalink)
 andreas 
Stuttgart, Germany
 
Experience: Master
Platform: Tradestation, Jigsaw
Broker: TS Brokerage / InteractiveBrokers / Rithmic
Trading: ES, TF, NQ, Stocks
Posts: 21 since May 2010
Thanks Given: 23
Thanks Received: 21


i am sorry, the whole idea was not clearly described..

what i am looking for is:
  • lets assume we enter a short position through a "sell stop" set by right clicking and select stop sell (or would i need my own menu?) with 10c.
  • initial stop loss is x ticks (works with ninja atm)
  • exit 8c at a profit target of x ticks (works with ninja atm)
  • set stop of remaining 2c to b/e + y ticks as an option "set to b/e" and "b/e + y ticks" in settings or by "enabling" it on demand with a button "set to b/e" (works sort of with ninja atm as it can only be done with a strategy on the fly or with overwriting the existing strategy)
  • once we have the stop at b/e(+y ticks) it should trail the stop z ticks above the highs of the n previous candles if they are making lower highs as an option in settings "trailing enabled" and "trailing margin in ticks" or by "enabling" it on demand with a button "Enable Trailing" (does not work in ninja atm)

regarding your post, it seems that i would need a strategy with buttons and stuff. However, as i am not able to code, i would need a coder to do that for me then...

If anyone could roughly estimate the effort needed to do this or even would code that for me, that would be awesome. in this case, please send me a p.m. with a price (if any ) and i am sure we can sort this out.

thanks,
Andreas

Started this thread Reply With Quote
  #4 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


andreas View Post
i am sorry, the whole idea was not clearly described..

what i am looking for is:
  • lets assume we enter a short position through a "sell stop" set by right clicking and select stop sell (or would i need my own menu?) with 10c.
  • initial stop loss is x ticks (works with ninja atm)
  • exit 8c at a profit target of x ticks (works with ninja atm)
  • set stop of remaining 2c to b/e + y ticks as an option "set to b/e" and "b/e + y ticks" in settings or by "enabling" it on demand with a button "set to b/e" (works sort of with ninja atm as it can only be done with a strategy on the fly or with overwriting the existing strategy)
  • once we have the stop at b/e(+y ticks) it should trail the stop z ticks above the highs of the n previous candles if they are making lower highs as an option in settings "trailing enabled" and "trailing margin in ticks" or by "enabling" it on demand with a button "Enable Trailing" (does not work in ninja atm)

regarding your post, it seems that i would need a strategy with buttons and stuff. However, as i am not able to code, i would need a coder to do that for me then...

If anyone could roughly estimate the effort needed to do this or even would code that for me, that would be awesome. in this case, please send me a p.m. with a price (if any ) and i am sure we can sort this out.

thanks,
Andreas


This is pretty clear now, and it can not be done with the available ATM settings. With an ATM strategy you can set the stop for the remaining contracts to breakeven + y ticks, but you can not trail the stop in the way you have described. For a short position NinjaTrader/ATM calculates the trailing amount from the lows (similar to a chandelier stop), and not from the high of the last N bars as you are doing.

I think the only option here would be to code a strategy with an interface that would allow you to enter your position manually via that strategy. The strategy would then take care of the profit target, initial stop, breakeven stop and trailing the stop for the last 2 contracts.

Reply With Quote




Last Updated on May 21, 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