Coding open on Tick

Forums ProRealTime English forum ProOrder support Coding open on Tick

  • This topic has 17 replies, 3 voices, and was last updated 2 hours ago by avatarJS.
Viewing 3 posts - 16 through 18 (of 18 total)
  • #242864
    JS

    When you are stopped out you can also use these:

    Once BarsToWait=3

    If StrategyProfit<>StrategyProfit[1] then

    StartBar=BarIndex

    EndIf

    If NOT LongOnMarket and OpenTime=>085500 and (BarIndex-StartBar)>BarsToWait then

    Buy….

    #242884

    This is my current code and in order to optimize it, I need to eliminate the amount of orders the system opens during chop times. However I seem unable to code this. This means that from the time we are stopped out until the next order is placed in the system. Thank you for your help!

     

    I can’t get it to work with the suggested code.

    BarIndex-TradeIndex>1

    If LongOnMarket and (BarIndex-TradeIndex)>1 and Close > TradePrice then

     

    This is my current code!

    //Conditions to enter long or short at Europe Open
    DefParam CumulateOrders=False
    DEFPARAM FLATBEFORE = 090000
    DEFPARAM FLATAFTER = 110000

    If OpenTime=085000 then
    RangeHigh=High
    RangeLow=Low
    EndIf

    If OpenTime=>085000 and OpenTime<090000 then
    RangeHigh=max(RangeHigh,High)//Highest of Range
    RangeLow=min(RangeLow,Low)//Lowest of Range
    EndIf

    If OpenTime=>085500 then
    Buy 1 contract at RangeHigh+3*pipsize Stop
    SellShort 1 contract at RangeLow-3*pipsize Stop
    EndIf

    //Set Stop Loss
    IF LongOnMarket THEN
    SET STOP LOSS RangeLow

    ENDIF

    IF ShortOnMarket THEN
    SET STOP LOSS RangeHigh

    ENDIF

     

    GraphOnPrice RangeHigh as “RangeHigh”
    GraphOnPrice RangeLow as “RangeLow”

    #242887
    JS

    You can use the “BarsToWait” parameter to set how many “Bars” should be between two “Trades”…

    I have adjusted the “Stop Loss” to the use of the “RangeLow” and “RangeHigh” price levels

Viewing 3 posts - 16 through 18 (of 18 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login