Coding Help needed – delay new trade after one closes

Forums ProRealTime English forum ProOrder support Coding Help needed – delay new trade after one closes

Viewing 3 posts - 1 through 3 (of 3 total)
  • #245359

    good afternoon all,

    i need some coding help please.

    i would like to add a parameter to the below code which defines how many bars to wait before re-entering a trade – assuming the conditions to trade are still being met.

    code is not finalised but being built out bit by bit. will be using 1m bars

    // Conditions for Entry of Long Positions
    IF CLOSE<EMA(20) AND NOT ONMARKET THEN
    BUY 1 CONTRACTS AT MARKET
    SET STOP $LOSS StopLoss
    ELSIF SHORTONMARKET AND (CLOSE-TRADEPRICE)  THEN
    BUY 1 CONTRACTS AT MARKET
    SET STOP $LOSS StopLoss
    ENDIF

    Hope it makes sense

    thanks in advance

    #245378

    Hi. You could add something like this:

    2 users thanked author for this post.
    #245404

    many thanks Ivan, the code works perfectly.

    thanks for your help, much appreciated

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

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