NexusFi: Find Your Edge


Home Menu

 





Trailing stop in strategy


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Bullywig with 7 posts (0 thanks)
    2. looks_two rleplae with 3 posts (2 thanks)
    3. looks_3 forgiven with 3 posts (2 thanks)
    4. looks_4 goodoboy with 2 posts (0 thanks)
    1. trending_up 9,542 views
    2. thumb_up 4 thanks given
    3. group 10 followers
    1. forum 20 posts
    2. attach_file 0 attachments




 
Search this Thread

Trailing stop in strategy

  #1 (permalink)
 
Bullywig's Avatar
 Bullywig 
Chicago
 
Experience: Intermediate
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: FDAX, NQ, HG, SI, CL
Posts: 68 since Oct 2015
Thanks Given: 42
Thanks Received: 22

I'm new to NT8 and trying to learn to build strategies. I have a basic strategy built that is working with 1 contract, and a simple profit target and stop in place.

I would like to know where I can find information on how, if my strategy is set to trade 2 contracts per execution, the stop moves to break even after the first profit target is filled, and then trails the second contract by (x) number of ticks until either second profit target is hit, or the stop is triggered.

Any direction is appreciated.

Bullywig

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
Futures True Range Report
The Elite Circle
Exit Strategy
NinjaTrader
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
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
39 thanks
Battlestations: Show us your trading desks!
26 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
  #2 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


Bullywig View Post
I'm new to NT8 and trying to learn to build strategies. I have a basic strategy built that is working with 1 contract, and a simple profit target and stop in place.

I would like to know where I can find information on how, if my strategy is set to trade 2 contracts per execution, the stop moves to break even after the first profit target is filled, and then trails the second contract by (x) number of ticks until either second profit target is hit, or the stop is triggered.

Any direction is appreciated.

Bullywig

Fire two separate orders with two different strategies associated
first ATM : stop X / target Y
second ATM : stop X + move to B/E or B/E+1, > x ticks and higher target and a trailing stop

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #3 (permalink)
 
Bullywig's Avatar
 Bullywig 
Chicago
 
Experience: Intermediate
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: FDAX, NQ, HG, SI, CL
Posts: 68 since Oct 2015
Thanks Given: 42
Thanks Received: 22



rleplae View Post
Fire two separate orders with two different strategies associated
first ATM : stop X / target Y
second ATM : stop X + move to B/E or B/E+1, > x ticks and higher target and a trailing stop

I created my strategy within the strategy wizard; is your solution done through the ninja script editor, or can you enter a formula within the strategy wizard for the stop strategy you are suggesting? Thank you for taking the time to answer.

Started this thread Reply With Quote
  #4 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


Bullywig View Post
I created my strategy within the strategy wizard; is your solution done through the ninja script editor, or can you enter a formula within the strategy wizard for the stop strategy you are suggesting? Thank you for taking the time to answer.

I am afraid you will have to go one level lower and that the strategy manager can not handle that
unless you tell it to do two things and you associate two ATM's

I write strategies in c#, i don't use the strategy manager
if not possible, you could create two identical strategies, that fire two times the same signal
but with a different ATM
in the ATM you can do what you want to do

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #5 (permalink)
 
Bullywig's Avatar
 Bullywig 
Chicago
 
Experience: Intermediate
Platform: NinjaTrader
Broker: NinjaTrader Brokerage
Trading: FDAX, NQ, HG, SI, CL
Posts: 68 since Oct 2015
Thanks Given: 42
Thanks Received: 22


rleplae View Post
I am afraid you will have to go one level lower and that the strategy manager can not handle that
unless you tell it to do two things and you associate two ATM's

I write strategies in c#, i don't use the strategy manager
if not possible, you could create two identical strategies, that fire two times the same signal
but with a different ATM
in the ATM you can do what you want to do

Can you recommend a good tutorial or video learning scenario for C+ for Ninjascript specifically? I'm a quick study, so I would welcome the opportunity to get more in depth on how these strategies actually work. Thanks again for your assistance.

Bullywig

Started this thread Reply With Quote
  #6 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


Bullywig View Post
Can you recommend a good tutorial or video learning scenario for C+ for Ninjascript specifically? I'm a quick study, so I would welcome the opportunity to get more in depth on how these strategies actually work. Thanks again for your assistance.

Bullywig

you need c#, not c++
there are many generic c# courses and then there are the particular design patterns of NT
I'm afraid there is not short cut, you need some time and effort to get to the bottom

good luck !

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #7 (permalink)
goodoboy
Houston
 
Posts: 380 since Dec 2016
Thanks Given: 344
Thanks Received: 246


Bullywig View Post
I created my strategy within the strategy wizard; is your solution done through the ninja script editor, or can you enter a formula within the strategy wizard for the stop strategy you are suggesting? Thank you for taking the time to answer.

Hello Bullywing,

You and I are on the same learning path. I just installed NT7 and learning how to code strategies as well.

I am starting out by reading the help files on strategy development and the ninja script language.

I am just studying all the samples I can and a major effort learning NT backtesting software structure.

I paused all manual trading until I learn how to program my strategy and back test it. There is a book at amazon called Learn #C in a day.

I can provide you some links in the morning for study. I am not at home, out at boring bar. Blahhh

Reply With Quote
  #8 (permalink)
goodoboy
Houston
 
Posts: 380 since Dec 2016
Thanks Given: 344
Thanks Received: 246


Bullywig View Post
I'm new to NT8 and trying to learn to build strategies. I have a basic strategy built that is working with 1 contract, and a simple profit target and stop in place.

I would like to know where I can find information on how, if my strategy is set to trade 2 contracts per execution, the stop moves to break even after the first profit target is filled, and then trails the second contract by (x) number of ticks until either second profit target is hit, or the stop is triggered.

Any direction is appreciated.

Bullywig

Hello Bullywing,

I trade just like this as well with 2 contracts and learning the strategy wizard now myself. I belive they mention this concept in the Strategy Wizard training video. Search youtube for NinjaTrader Strategy 301 and they talk about their Order management methods and you can assign tags names to the contract quantity along with trailing. Or go to the help files and read on Order Management.

Let me know if that helps.

Reply With Quote
  #9 (permalink)
infe2015
stockholm Sweden
 
Posts: 5 since Mar 2016
Thanks Given: 2
Thanks Received: 1


Bullywig View Post
I'm new to NT8 and trying to learn to build strategies. I have a basic strategy built that is working with 1 contract, and a simple profit target and stop in place.

I would like to know where I can find information on how, if my strategy is set to trade 2 contracts per execution, the stop moves to break even after the first profit target is filled, and then trails the second contract by (x) number of ticks until either second profit target is hit, or the stop is triggered.

Any direction is appreciated.

Bullywig

Hi
se if you can do something with this.

{ProfitTake}

If (MarketPosition =1) and currentcontracts = Antal
{ProfitTake step1} and close > entryprice + range then begin Sell ("Ptl") Antal - 200000 contracts This bar;
End ;

If (MarketPosition =1)and NegTrend = 1 and currentcontracts = 200000
{ProfitTake step2} and close > entryprice + range * 2 then begin Sell ("Pt2") 100000 contracts This bar;
PtStoppL = Low - 0.00005;
End ;

{*** Exit Long Stopp1 ***}
If (MarketPosition =1)
{Profit stoppL} Then begin
If Close crosses under PtStoppL
then begin Sell ("Pt3") This bar;
End ; End;

Reply With Quote
  #10 (permalink)
 
forgiven's Avatar
 forgiven 
Fletcher NC
Market Wizard
 
Experience: Intermediate
Platform: nijia trader
Broker: A.M.P. I.Q. ....C.Q.G.
Trading: ym es
Frequency: Every few days
Duration: Days
Posts: 862 since Mar 2012
Thanks Given: 287
Thanks Received: 580


you can buy a prepackaged algo that is smart, it will adjust its self based on changing market conditions. there like 80 to 100 bucks... how much is your time worth trying to playing with the software. hope it helps

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on March 1, 2017


© 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