Central Bank Dealers Range – Reversal strategy Help please!

Forums ProRealTime English forum ProBuilder support Central Bank Dealers Range – Reversal strategy Help please!

Viewing 15 posts - 16 through 30 (of 31 total)
  • #233377

    druby is right, change those lines as recommended. This change will still keep your SL changing every candle.

    If you want to set your SL only once, I recommend adding these lines at the beginning of your code (in between lines 1 and 2):

    this will set your SL according to the values retained when the pending order was set (the prior candle).

    If you want to set your SL according to the values set when the order was triggered (the currently closed candle), then add those lines in between lines 52 and 53, instead.

     

     

    2 users thanked author for this post.
    #233383

    Hi druby and robertogozzi,

    I have tried adding as robberto mentioned but did not change anything and still the same.

    Once the long or the short entry is triggered, SL or TP must not change. should stay the same but it should not go till the next trade. is it possible to cancel everything maybe just before at 19.00. means will exit the whole trade with a loss or a profit as SL or the TP not hit. and everything to be calculated fresh as a new trade from 1900-0100 next day? seems like this one goes on until the SL or the TP hit? Please correct me if I’m wrong.

    I have added the same example EURUSD – May 14th still entered and exit at the same time.

    I really appreciate all of your attention, thank you once again.

    #233392
    JS

    Hi,

    These levels are calculated as a percentage of the original range (Diff=HH-LL) …

    Is this what you’re looking for?

    The difference in notation is because you are probably on a “spread betting account”…

    #233394

    Hi JS,

    Your Pic example shows exactly what should happen. should this change to calculate values instead of percentages if it doesn’t work on spread betting? 🙁

    #233396
    JS

    It will make no difference…

    1 user thanked author for this post.
    #233397
    JS

    Hi,

    (Intra) Day starts at 00:00

    First action at 01:00: determine the range (HH-LL) over the last six hours…

    (Six hours corresponds to the time between yesterday 19:00 and today 01:00)

    You only set a new range when there is no position open, this to prevent the SL and TP from changing while a position is open…

     If OpenTime=010000 and NOT OnMarket then

    HH=Highest[24](High)

    LL=Lowest[24](Low)

    diff=HH-LL

    Level0=HH

    Level100=LL

    EndIf

    Second action runs from 01:00 to 10:00

    Positions can be opened in this time slot, but only if there is no open position yet…

    If Time>010000 and Time<100000 and NOT OnMarket then

    If Low<Level0-(Diff*Mult) then

    Buy 1 contract at Market

    EndIf

    If Close>Level100+(Diff*Mult) then

    SellShort 1 contract at Market

    EndIf

    Set Stop Loss SL*Diff

    Set Target Profit TP*Diff

    EndIf

    That’s it…

    2 users thanked author for this post.
    #233398
    JS

    If you want to see the same values as on my screenshot, use:

    DefParam CumulateOrders=False
    Mult=2.5
    SL=1.5
    TP=2
    If OpenTime=010000 and NOT OnMarket then

    1 user thanked author for this post.
    #233412

    Hi JS,

    It works nicely… only one or two entries are in different values! thanks very much I’m happy at least to develop this strategy to this level!

    I noticed something on EURUSD 17MAY – SL hit at 9.30am and then at 9.45am another long trade gets triggered. is this because it’s before 10am? how to cancel that? same thing has happen on the 17MAR! Please see attached example. How to avoid this please? Please see attached example

     

    Thanks again to everyone developing this strategy.  Even though the original strategy is about Central Banks Dealers Range at 19.00-1.00 ! it gets very interesting when you change the time ranges in different markets.

    #233416
    JS

    Hi @crolakstrading

    That’s right, between Time>010000 and Time<100000, the system is free to open and close positions… I have changed the code so that only 1 trade is opened per day…

    A few points to consider…

    In line 14 “If Low<…” you can use the “Close” or the “Low”

    In line 18 “If Close>…” you can use the “Close” or the “High”

    Good luck with your system…

    1 user thanked author for this post.
    #233571

    Hi @JS,

    Thanks very much again.. I have been checking this it works great I think. I changed the line 28 If Close> to If High>

    Some entries both short or long are a bit different. example EURUSD 17MAy it triggers 2 pips above. so instead of hitting TP it goes to SL. This might be a stupid question but is this because of the spread? please see below pic.

    Thank yo

     

    u in advance.

    #233573
    JS

    Hi @crolakstrading

    On May 17, the “EntryLong” is 1.085480, the “Low” (you have to look at the bar before the entry) is 1.08544 so a long position will be opened on the “Open” of the next bar (1.08557) …

    So, it’s exactly right and has nothing to do with the (unused) spread… 🙂

    1 user thanked author for this post.
    #233743

    @JS thank you so much! will test this more! 🙂

    1 user thanked author for this post.
    avatar JS
    #233747
    JS

    Hi @crolakstrading

    Currently, the orders that are used in your system are “market orders”…

    These orders will never open exactly on the drawn lines because they open on the “Open” of the next bar…

    If you do want to have an exact execution on the lines, you will have to use a different type of order, for example “limit orders”…

    1 user thanked author for this post.
    #233769

    HI @JS,

    yeah the lines show exact execution but entries are little bit different. how can we change it to “limit orders”? to get exact entry as the line? this will make the 17th loss in to a profit.

    tried but clearly i’m doing it wrong!!

    #233841
    JS

    Hi @crolakstrading

    Here is the system based on “Limit” orders instead of “Market” orders…

    1 user thanked author for this post.
Viewing 15 posts - 16 through 30 (of 31 total)

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