Entry, Exit and Profit coding in autotrading

Forums ProRealTime English forum ProOrder support Entry, Exit and Profit coding in autotrading

Viewing 2 posts - 1 through 2 (of 2 total)
  • #17550

    Hi,

    I am trying to code an auto-traded strategy but would need some “basic” help to complete it as I am still new to the programming – so straight to the Questions:

    • Q1 – Exit: In the auto trading function you will by default exit at market price, next bar open. I rather want to exit at current bar 5 minutes before closing. How to code that?
    • Q2 – Entry: By default, you enter at market price, next bar open. I rather want to enter next bar open IF e.g. +0.2% above prev candle high. How to code that?
    • Q3 – Profit: At previous structure high (looking e.g. 20 days back). How to code that?

     

    Many thanks in advance! Examples are appreciated too.

     

    Lasse

    #17572

    Please find below answers to your 3 questions:

    1/ Not possible until the multi-timeframe is available in the coding languag

    2/ You need to place on market a pending STOP order at current high price * 0.002 , it will only last 1 candlestick:

    3/ First define the profit in points between the 20 days back highest high and the current close (price when the calculation will be made):

    then set your takeprofit in your code with this instruction:

     

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

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