NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 09-27-2010, 10:19 PM   #1
nt2010
Member
 
Join Date: Jun 2010
Posts: 35
Thanks: 0
Thanked 0 times in 0 posts
Default Referenceproblem for Stop Orders

Hello,

i have a problem referencing to the correct bars for placing my stop order.

Once i am in a position, in this case LONG, i like to place a stop order below the lowest low of the first 3 candles of the day.

I gave it a try with MIN(Low,3)[0] but then it takes the lowest low of the 3 candles before the current entry. Since the entry is allways on a different counted candle, i can not change the [0] value to another because the reference would be still wrong.

Question: Is it possible to tell Ninjatrader, that it should take the lowest low of the first 3 Candles since the session started as stop value ?

thank you for your support
NT2010
nt2010 is offline  
Reply With Quote
Old 09-28-2010, 03:02 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

nt2010, this is possible, but you would need to custom code the 'finding' of your stop value then for the day. You can just use a variable reset at the session break to keep track of the it.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 09-28-2010, 04:04 AM   #3
nt2010
Member
 
Join Date: Jun 2010
Posts: 35
Thanks: 0
Thanked 0 times in 0 posts
Default

Hello Bertrand,

thank you for your fast reply. It would be great if you could give me a link to a section where i can find some explanation with a code sample. Thank you for your support !

NT2010
nt2010 is offline  
Reply With Quote
Old 09-28-2010, 04:09 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

Unfortunately I would not have sample available for this task, it's just basic programming with a variable: at the session break you save the current value of the Low of the price bar, on the next 3 bars you check if the current Low is lower than the saved value in your variable, if yes you update the reference value, if not you hold on to the previously saved value.
NinjaTrader_Bertrand is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
stop loss & profit target orders get activated only after buy stop order is execute clearpicks Automated Trading 1 07-21-2010 06:18 AM
Chart Trading with Buy Stop/ Sell Stop orders tschalli27 Charting 3 10-20-2009 03:35 PM
Order Entry Property: Use stop market for stop loss orders higler SuperDOM and other Order Entry Windows 7 07-02-2007 09:06 AM
Stop Loss Orders activated by number of trades past stop level DoveforUsAll Suggestions And Feedback 1 02-08-2006 01:19 AM
Targets - Stop Orders or Stop Limit Orders? Nereus ATM Strategies (Discretionary Trading) 3 05-31-2005 07:13 AM


All times are GMT -6. The time now is 02:41 PM.