Inquiry coding inside bar momentum strategy

Forums ProRealTime English forum ProOrder support Inquiry coding inside bar momentum strategy

Viewing 15 posts - 1 through 15 (of 15 total)
  • #175909

    Hello, I have a request to code the Inside Bar Momentum strategy of baby pips. The following link contains the exact rules. Can someone code that for me, please?

    https://www.babypips.com/trading/new-forex-system-inside-bar-momentum-strategy

    #175930

    There you go (not tested, though):

     

    1 user thanked author for this post.
    #175931

    I coded  two different ways to define an INSIDE bar.

    Line 5 (which I used) requires than only one among prior Low and High be greater/lower, the other one can be EQUAL.

    Line 6 (commented) requires that BOTH prior High and Low be greater/lower.

    You can uncomment line 6 and comment out line 5, if preferred.

     

    1 user thanked author for this post.
    #175939

    That’s very good. Thanks! This is exactly what I imagined. Of course, when I start it in an H4 timeframe, I don’t have a TP or SL for 4 hours which can be fatal at times. Can I also use these terms as an MTF? H4 in M1? Then I would have a maximum of 1 minute in the M1 timeframe without SL and TP.

    #175955

    You HAVE a TP & SL, though it can be slightly higher and will be updated the next bar.

     

    #175964

    Oh, thank you for the hint.

    #175996

    On the one hand, the instructions “bullish” and “bearish” must still be included in the input conditions. Nonetheless, this type of system seems to work quite well in manual trading, but not really functional as an algo. At least I haven’t gotten it profitable until now. Not even with MTF. I think range breakouts are easier to automate than individual candles. At least not with stop orders. Unless someone has another idea?

    #176005

    I usually add them, as they are no more returned as an error (like it was in v10.3). You can safely remove lines 3-4.

     

     

    #176008

    Did you have a positive result in your backtest?

    #176016

    No, not good results.

    I tried changing some lines.

    Lines 10-11 to set the SL to the previous LOW/HIGH:

    Lines 12-13 to set a TP as a factor of SL:

    and commented out lines 35-36, so that the strategy doesn’t exit on a subsequent INSIDE bar.

    Positive results (without a trailing stop) a Daily TF (200K units and 2-pip spread, I did not change it each time) are best on AudJpy, AudNzd, AudUsd, CadJpy, EurAud, EurUsd, GbpJpy, GbpUsd, Italy 40, NzdJpy and UsdChf.

     

     

     

     

    #176017

    Adding this trailing stop improved results slightly:

    #176019

    Thanks very much. I’ll have a look at myself tonight.

    #177129

    Using the code on the link below, I am getting rejected loads for being too close / less than IG minimum etc.

    https://www.prorealcode.com/topic/inquiry-coding-inside-bar-momentum-strategy/#post-175930

    What can I add so the code is not rejcted please?

    PS

    I even ticked the Guaranteed box and the IG can move stops box but it made no difference … still got rejected for beng too close to price etc

    #177133

    You have to check, each time a pending order is to be placed, whether its entry price sits within the rquired distance from the current price (CLOSE).
    I have added DISTANCE, as first line, to which you want to assign the distance (in Pips) required by IG for the traded instrument/asset:

    1 user thanked author for this post.
    #177134

    If you don’t want to enter at market because you may refer to wait longer for the proper conditions for a pending order, simply comment out lines 23 and 31.

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

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