![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jan 2010
Posts: 15
Thanks: 0
Thanked 1 time in 1 post
|
Hi
I'm trying to develop an ninja strategy where it buys at the close of up range bar. i will manually ensure other conditions are met but when i do decide to buy i want to let the system buy it at close of range bar(the reseason i want to automate the buy order is by the time i manually calculate the close price of range bar and place the order, the price is already moved to next range bar.) i wrote a condition Close(0)>open(0) then go long limit at close with profit target of 10. once i activate this strategy the system is giong back in time and making sure last trade(which would have taken at last up bar) has met the profit target, if not then its not taking any trading at the present. i dont want this to happen, i just want it to look at only from current bar and disregard previous bars or trades. Please help. THanks Chak. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,377
Thanks: 252
Thanked 966 times in 949 posts
|
Chak, thanks for the post here - you can put if (Historical) return at your OnBarUpdate() start for the strategy. It would then only evaluate any conditions from the point of enabled / seeing realtime data onwards.
http://www.ninjatrader.com/support/h...sub=Historical
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Buy/Sell this bar at close? | dowhk | General Programming | 9 | 02-22-2012 07:16 AM |
| Buy on Close (Today) | Stephan123 | General Programming | 19 | 03-28-2011 01:41 PM |
| Predict RSI value on the range bar close | nandu | Indicator Development | 1 | 01-20-2010 04:31 AM |
| Close[1] acts on wrong range bar | Operandi | Strategy Development | 11 | 01-23-2009 07:10 AM |
| buy/sell at close of bar? | coffee898 | Charting | 4 | 03-20-2007 03:55 AM |