three trades per hour max

Forums ProRealTime English forum ProBuilder support three trades per hour max

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

    Hello,

     

    I would like my trading system to place no more than 3 trades in any given trading hour.

    For example it will be placing trades throughtout the day, but if it places 3 trades during 3-4PM then i wnt it to no place anymore trades until it reaches 5pm

    i dont want it to be able to place like 5-1o trades in a short pace of time so i need to limit it to place no more than 3 per hour

     

    IF anyone knows the code to use to do this please let me know

    I have some good algorithms that i will happily share with who ever provides me with this code

     

    thanks

    #32144

    If you get the answer you need from this site would you share at least 1 of your good algos with this site … as that is what this site is all about.

    GraHal

    #32183

    Ok no problem ill share some if i get the answer

    #32229

    Isn’t this the same question you asked 4 days ago under ‘Max number of open trades??’

    I believe the answer I gave works did you try it?

    #32233

    Yea i trie dbut it didnt work i got an error saying incomplete code

    #32237

    say for example this is my code:

     

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated

    // Prevents the system from placing new orders on specified days of the week
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0

    // Conditions to enter long positions
    indicator1 = Stochastic[14,3](close)
    c1 = (indicator1 CROSSES OVER 70)
    indicator2 = Average[200](close)
    c2 = (close > indicator2)

    IF (c1 AND c2) AND not daysForbiddenEntry THEN
    BUY 1 PERPOINT AT MARKET
    ENDIF

    // Stops and targets
    SET TARGET pPROFIT 10

     

     

    where should i enter the code you sent me to limit the trading to 3 per hour max???

     

    please copy my code and enter the relevant code and paste it back

     

    thanks in advance

    #32267

    Hello. As I can see from your first post you are using a daily timeframe or am I mistaken?

    Since our code is tested once at each timeframe we cannot calculate anything on a hourly basis if 1 day TF is used.

    if you want to only have 3 trades a hour you need to lower your timeframe to a max of 15 min.

    Cheers Kasper

     

    #32292

    That cose ewas example

    Please let me know how to do ot fpr a two minute chart

    I am using a 2 min timeframe

    Please use the code above and cchange it to two minute timeftame and enter the code to limit trading to three trades per hour max on a twp minute timeframe

    Thanks

    #32293

    Hi AlreadyRich,

    Seems my original code was not so good (TRADEINDEX counts all transactions) not as straightforward a problem as it first sight appeared.

    Attached is some code which I believe does what you want which I have tested on DAX and DJI 2 minute charts.  let me know if this works for you.

     

    1 user thanked author for this post.
    #32310

    Hi Rich.

    I don’t know it this will work- I cannot find a test where I have 3 trades within one hour, so can you test this?

     

    1 user thanked author for this post.
    #32311

    I see a error- line 32 is missing a 0

     

    #32313

    thanks – i will test now

    #32368

    the backtest isnt working – i am getting results of no trades

    #32371

    Hi Autostrategist,

     

    your code seems like its on the right track however its still slightly off

     

    can you please create it in the same format as how the simplified creation normally creates its code.. i have pasted my code below…can you please merge the two into one code –  so that my below code is set to place no more than 3 trades per hour? thanks in advance

     

     

     

    #32506

    Hi Rich,

    I took my code and added it in to yours.  You are a very brave man if you are running that strategy live, I wish you well with it. You know what they say if something looks too good to be true…

     

     

     

Viewing 15 posts - 1 through 15 (of 17 total)

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