Simple reversal scalper

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #81487 quote
    Stratus6
    Participant
    Junior

    Here is my min scalper.

    Buy side only.

    Works pretty well in most time frames

    Only issue I have is it needs monitoring as sometimes the stop level – which initially shows up fine occasionally disappears. Not sure where I have got the code wrong here!

    Any help with this would be appreciated.

    screen-shot-at-15380689378cp4l.png screen-shot-at-15380689378cp4l.png Mini-reversal.itf
    #81536 quote
    Nicolas
    Keymaster
    Master

    The stop order is disapearring because pending order only last one bar, and you put it only one time when you trigger the buy at market order. In the code below, I moved it outside of this conditional block and create a new one where the pending order will be placed continuously and only if we are on market.

    //Mini reversal
    
    DEFPARAM CumulateOrders = True //
    DEFPARAM Preloadbars = 1000
    DEFPARAM Flatbefore = 080000
    DEFPARAM Flatafter = 210000
    DaysForbiddenEntry = OpenDayOfWeek = 5 OR OpenDayOfWeek = 0
    
    x = 4// bar height
    
    // Conditions to enter Long positions
    c1 = Close[0] > Close[1] + (Open[1] - Close[1]) * 0.9
    
    c2 = Close[0] < Open[2] - (Open[2] - Close[2]) * 0.9
    
    c3 = (Open[3] - Close[3]) > x
    
    c4 = (Open[2] - Close[2]) > x
    
    c5 = (Open[1] - Close[1]) > x
    
    c6 = Close[0] > Open[0]
    
    Once Downstop = 1
    Once Uptarget = 1
    
    If c1 and c2 and c3 and c4 and c5 and c6 and not DaysForbiddenEntry then
    BUY 10 lots at Market
    
    Uptarget = abs(Open[1] - Close[0])
    Downstop = Lowest[2](low) - 1
    
    Set Target pProfit Uptarget
    
    
    Endif
    
    if onmarket then  
     Sell at Downstop stop
    endif
    Stratus6 thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Simple reversal scalper


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Stratus6 @stratus6 Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/28/2018
Status: Active
Attachments: 2 files
Logo Logo
Loading...