help code walmal scalp-method

Forums ProRealTime English forum ProOrder support help code walmal scalp-method

Viewing 9 posts - 1 through 9 (of 9 total)
  • #166932

    There is a know forextrader called the rumpleone. He has been around for along time. On his youtube chanel he and a friend of his trades this strategy on mt4. They are both only trading using statistics and have been for last 20+ years. Would like to get some help coding it for PRT. In theory it seems supereffective. Want to see how it tests back in time over a big sample.

    Attached a picture on the template they use in mt4. Red and Green lines are the breakout lines where stop-orders should be +-1 pip

    Rules:

    • SL 10 pips
    • Only trade in direction of hourly candle
    • Only trade from 8.00 to 16.00 GMT, this is when ex GBPUSD range always is bigger then 10, therefor in theory price has to break out between 00, 10, 20, 30, 40, 50, 60, 70, 80, 90 lines
    • Every new hour, take a trade when price breaks 00, 10, 20, 30, 40, 50, 60, 70, 80, 90 line (ex. 1.37400) example in the picture, price opened between 1.37500 and 1.37600. Set a sellstop at 1.37500 -1 pip and a buystop at 1.37600 +1 pip
    • When price moved 1 pips in my favor. Move SL to -7.
    • When price moved 5 pips move SL to BE+1
    • No fixed TP, trailstop keep locking in for every 5 pip gain. So at 10 pips profit, move SL to +5. at 15 move to 10 etc.

    if trailstop/BE function is not possible. Just trailstop every 5 pip.

    #166933

    dont know why picture did not upload on last post

    #166979

    There you go:

    I think this code will exit quite soon when running, because most of times the entry price is too close to the current price so it is likely not to meet the broker’s minimum distance requirements for pending orders.

     

     

    #166990

    thanks alot again roberto!!

    but strategy takes position at night as well it looks like.

    Also, is it possible to code that it takes maximum x number of positions every hour?

    #167007

    My fault, I forgot to add cTime and cDay to the conditions to enter a trade.

    Replace line 18 with this one:

    Moreover, I added line 25 for a TP to better test  the code. You did not want it, so you can comment it out.

     

     

    #167015

    thanks alot roberto!!

    #167026

    I forgot to answer your question about the max. number of trades per hour.

    I modified the code using MTF support so that I can use the 1-hour TF to accomplish that limitation.

    Of course you cannot use TF’s higher than 1 hour and the 1-hour TF must be multiple of the one you are using on your chart (you cannot use a 7-minute TF because 1 hour, or 60 minutes, is not a multiple of 7).

    Set MaxTrades to any integer number.

     

    2 users thanked author for this post.
    #167081

    Made a backtest on GBPEUR and it looked amazing as in Holy Smokes-amazing… until I saw I forgot to put in the spread 😉

    Still very good job though, Robert!

    #167095

    That’s backtest.

    As I said, when you let it run on your account (demo or real makes no difference), the pending orders will, most of the time, be rejected being too close to the current price (and the strategy is most likely to be shut down).

    Whenever you deal with small SL’s and TP’s using pending orders… bad things may happen!

    This LONG exit will work, even though the current price is quite at the same leve lthan the current price:

    this is likely not to work (unless a spike earned you a bunch of more than 2 pips):

     

Viewing 9 posts - 1 through 9 (of 9 total)

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