Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Programming an ORB

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Programming an ORB

    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
    Try something like:

    if (Close[0]> CurrentDayOHL.CurrentOpen[0]+ATR(periods)[0])
    RayNinjaTrader Customer Service

    Comment


      #3


      Cool...it worked.
      Thanks for the quick reply.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      67 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      36 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      59 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      62 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X