NexusFi: Find Your Edge


Home Menu

 





Dynamic Stop Loss


Discussion in NinjaTrader

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




 
Search this Thread

Dynamic Stop Loss

  #1 (permalink)
wallsteetking
MN
 
Posts: 25 since Feb 2011
Thanks Given: 4
Thanks Received: 0

Hi i am writing a code in nijatrader when I setup the stop loss I can only have a fixed stop loss price for example 10 ticks. However, what I want my stop loss to be is 2 candles prior low. instead of a fixed stop loss.

for example. Ninjatrade enters a Long trade the stop loss should be 2 candles prior low. this way the stop loss can be 5 ticks or 15 ticks. its always changing

Does anyone know how to write that kind of stop loss code in ninjatrader . thank you for your time

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Quantum physics & Trading dynamics
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Funded Trader platforms
32 thanks
Just another trading journal: PA, Wyckoff & Trends
23 thanks
Trading with Intuition
17 thanks
Self sabotage reframed
11 thanks
ApexTraderFunding.com experience and review
10 thanks
  #3 (permalink)
 
redratsal's Avatar
 redratsal 
Milan (I)
 
Experience: Advanced
Platform: Ninjatrader
Broker: Kinetick
Trading: FDAX,6E,CL,YM,NQ,ES
Posts: 1,648 since Oct 2010
Thanks Given: 1,215
Thanks Received: 2,090



wallsteetking View Post
Hi i am writing a code in nijatrader when I setup the stop loss I can only have a fixed stop loss price for example 10 ticks. However, what I want my stop loss to be is 2 candles prior low. instead of a fixed stop loss.

for example. Ninjatrade enters a Long trade the stop loss should be 2 candles prior low. this way the stop loss can be 5 ticks or 15 ticks. its always changing

Does anyone know how to write that kind of stop loss code in ninjatrader . thank you for your time

Try this one



if
(Position.MarketPosition == MarketPosition.Long)
{

if enter condition

{

SetStopLoss(CalculationMode.Price, Low[2]);
}
}


Visit my NexusFi Trade Journal Reply With Quote




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