Buy on Breakout london + Partial closure

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #122434 quote
    ChrisTourDuMonde
    Participant
    Junior

    Hello, i m new to automatic trading, i m trying to make a very simple strategy about london breakout, i tried many ways but it still does nt work.

    Basically : in 1 hour timeframe i look for the high and low of the 3 bars before london opening.

    if at some point the price cross the “high of the 3 hours before london opening” ->  buy 2 contracts ,

    Set stop loss at low of the “range 3 hours”  ,

    Take 50% profit (here 1 contract) at   : the high + “range distance of the 3 hours  range” and move the stop loss at high of the “range 3 hours”

    Take 50% profit (the 1 contract still in position) at : the high + 2 * “range distance of the 3 hours  range”

    Please could you help me ?

    Pictures are always the best to describe so

    • I put in attachment a picture of what i would like on the GBP USD TimeFrame 1 Hour, Friday 6 march 2020
    • The indicator i use to draw arrows for this strategy.
    DEFPARAM CumulateOrders = false // Cumulating positions deactivated
    // The system will cancel all pending orders and close all positions at 0:00. No new ones will be allowed until after the "FLATBEFORE" time.
    DEFPARAM FLATBEFORE = 060000
    // Cancel all pending orders and close all positions at the "FLATAFTER" time
    DEFPARAM FLATAFTER = 130000
    
    CountBuy = 0
    
    EMA25 = exponentialaverage[25]
    
    if currenttime = 080000  then
    max1 = high
    min1 = low
    endif
    
    if currenttime = 070000  then
    max2 = high
    min2 = low
    endif
    
    if currenttime = 060000  then
    max3 = high
    min3 = low
    endif
    
    Maximum = max(max1,max(max2,max3))
    Minimum = min(min1,min(min2,min3))
    
    if currenttime = 090000  then
    EMA25Price = exponentialaverage[25]
    endif
    
    RangeSize = Maximum - Minimum
    
    
    if Maximum > EMA25Price and Minimum > EMA25Price and CountBuy = 0 then
    
    
    if  time = 080000  and CountBuy = 0 and high < Maximum then
    
    BUY 1 CONTRACTS AT Maximum stop
    SET STOP LOSS RangeSize
    SET TARGET PROFIT RangeSize
    
    BUY 1 CONTRACTS AT Maximum stop
    SET STOP LOSS RangeSize * 2
    SET TARGET PROFIT RangeSize
    
    CountBuy = 1
    
    endif
    
    if  currenttime = 090000  and CountBuy = 0 and high < Maximum then
    
    BUY 2 CONTRACTS AT Maximum stop
    
    SET STOP LOSS RangeSize
    
    sell 1 contracts at Maximum + RangeSize limit
    
    sell 1 contracts at Maximum + 2*RangeSize limit
    
    //SET TARGET PROFIT RangeSize
    
    CountBuy =  1
    endif
    
    if  currenttime = 100000  and CountBuy = 0 and high < Maximum then
    
    BUY 1 CONTRACTS AT Maximum stop
    
    SET STOP LOSS RangeSize
    
    SET TARGET PROFIT RangeSize
    
    CountBuy =   1
    
    endif
    
    if  currenttime = 110000 and CountBuy = 0 and high < Maximum then
    
    BUY 1 CONTRACTS AT Maximum stop
    
    SET STOP LOSS RangeSize
    
    SET TARGET PROFIT RangeSize
    
    CountBuy =   1
    
    endif
    
    endif
    
    //graph CountBuy
    
    graph Maximum
    
    Dr Manhattan thanked this post
    Break-Out-london-indicator.itf Friday-6-March-GBP-USD-1H.png Friday-6-March-GBP-USD-1H.png
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Buy on Breakout london + Partial closure


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/18/2020
Status: Active
Attachments: 2 files
Logo Logo
Loading...