Breakout Strategy

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4038 quote
    Delta
    Participant
    New

    Hello

    I have a simple query regarding a breakout strategy. I am trying to test a breakout strategy where I would like to get the High and the low between certain time frames in the day. For e.g. The hi and lo between 11:00 PM to 12:30 AM.

    Firstly, I would like to know the code to identify the hi and low levels between the time frames mentioned above (11:00 PM – 12:30 AM).

    After the first step I would like to know the code to identify the breakout bar. The condition for a successful breakout is the bar should open inside the range defined in the first step but close outside the range defined.

    Kindly check the image file link or the attachment for better clarity.

    http://postimg.org/image/3vitfqp0t/

    I would really appreciate if anyone can help me with my query.
    Thank you

    D

    #4552 quote
    Nicolas
    Keymaster
    Master

    Hello Delta,

    I made a little indicator to show you how to deal with finding highest and lowest between 2 hours. (please find attached a file and a screenshot of the indicator). You’ll find it easy to include that code into your automated trading strategy.

    starttime = 050000
    endtime = 090000
    
    if intradaybarindex=0 then
     hh = 0
     ll = 0
    endif
    
    if time>=starttime and time<=endtime then
     if high>hh then
      hh = high
     endif
     if low<ll or ll=0 then
      ll = low
     endif
    endif
    
    RETURN hh,ll
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Breakout Strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Delta @delta01 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
9 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/21/2016
Status: Active
Attachments: No files
Logo Logo
Loading...