NEED HELP TO CODE THE OIL BREAKOUT SYSTEM

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #16785 quote
    GAMMA
    Participant
    Junior

    WE NEED HELP TO CODE , 

    OIL/NGAS / TIME 9.00  END2.00  @5 MIN OPEN RANGE   FOR OIL/GAS

    WHEN THE PRICE GO 8 TICK UP OR DOWN AND STAY THERE FOR 2.50 MIN  . THEN A BUY AND SELL ORDER PLACE

    LOT 2

    NO TRADE ON WED DAY  TILL 10.35 AM

    STOP LOSS 15 TARGET 2

     

     

     

    #16786 quote
    GAMMA
    Participant
    Junior

    SORRY STOP LOSS 15/ TARGET  IS25

    #16792 quote
    Wing
    Participant
    Veteran

    On a 5-minute timeframe, you can’t check whether a price stays somewhere for 2.5 min, only in increments of 5 min can you check this.

     

     

    #16793 quote
    GAMMA
    Participant
    Junior

    it was just to make sure the no false breakout, it can be 5 min 

    thank you for your advise 

    p.s i took from the book of mark a fisher  he was floor trader at nymex

    #16794 quote
    Wing
    Participant
    Veteran

    Alright, maybe here is a code you can try. Note that you might need to change “8” to really be 8 ticks.

    timech=090500
    if dayofweek=3 then
    timech=103500
    endif
    
    if time=timech then
    if close>close[1]+8 then
    buy 1 lot at market
    endif
    if close<close[1]-8 then
    sellshort 1 lot at market
    endif
    endif
    
    if time>=140000 then
    sell at market
    exitshort at market
    endif
    
    set stop loss 15
    set target profit 25

     

    Nicolas thanked this post
    #16822 quote
    Nicolas
    Keymaster
    Master
    Thanks a lot Wing for helping coding GAMMA’s request. As you said, to adapt the number “8” to be more universal for every instruments, you can multiply it with “ticksize”, like this:
    if close>close[1]+8*ticksize then
    #16851 quote
    GAMMA
    Participant
    Junior

    wing, thank you very much it was great, I will like to add some more on Monday .

    #16866 quote
    GAMMA
    Participant
    Junior

    HERE IS SOME WAY WE CAN CONTROL THE FALSE BREAOUT

    A. HIGH+LOW+CLOSE  DIVIDED BY 3

    B. HIGH+LOW DIVIDED BY 2

    C . A-B=

    D. C+ A AND THEN C- A

    THIS IS CALLED DAILY PIVOT RANGE/ IF THE  PREVIOUS DAY CLOSE WAS ABOVE TODAY DAILY PIVOT RANGE IT BULLISH

    #16867 quote
    GAMMA
    Participant
    Junior

    IF IT CLOSE BELOW TODAY DAILY PIVOT RANGE THEN IS  BEARISH

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.

NEED HELP TO CODE THE OIL BREAKOUT SYSTEM


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
GAMMA @gamma Participant
Summary

This topic contains 8 replies,
has 3 voices, and was last updated by GAMMA
9 years, 3 months ago.

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