![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jun 2008
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
|
Hi there,
i´m trying to program Opening Range breakout strategy, which contains the following conditions: - Trend Indicators on the Daily Chart - customized Opening Range on a 15 Min Chart Since i´m right at the start and I need to do some experiments on this topic, i´ll leave this Trend Indicators on Daily for later programming sessions, but i now have a problem on constructing the opening range on a 15 min chart. i use the predefined CurrentDayOHL indicator for calculating the open of the session and i want to add and subtract certain numbers to/from the open. However, it is impossible to use"+" and "-" with strings and a bolean or a double, lets say. The only thing, thats possible, is comparing strings. So I tried for example if (Close[0]> CurrentDayOHL.CurrentOpen[0]+ATR(periods)) as a condition, but this will give me a compiling errorcode. How do I overcome this problem?? I´m not a programmer and i also tried it via the wizzard, but it also looks like it isn´t possible Thanks alot for your help |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,164
Thanks: 6
Thanked 46 times in 32 posts
|
Try something like:
if (Close[0]> CurrentDayOHL.CurrentOpen[0]+ATR(periods)[0])
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2008
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
|
![]() Cool...it worked. Thanks for the quick reply. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming connections | Gumphrie | Connecting | 6 | 12-11-2009 03:09 AM |
| Zero Lag MACD - programming hint | total3 | Indicator Development | 28 | 05-27-2009 08:49 AM |
| 3rd Party Programming | John_Aus | General Programming | 2 | 05-26-2008 10:51 PM |
| Programming references | bobajob78 | General Programming | 1 | 02-11-2008 03:32 PM |
| Advanced Programming | sbtrader | General Programming | 3 | 10-26-2007 10:11 AM |