Close transaction at specific time

Forums ProRealTime English forum ProOrder support Close transaction at specific time

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

    Hi all,

    I am trying to code a autotrader that enters into a long position in Hong Kong 50 between certain times and which closes the transaction at a specific time.

    the enter long command wouldn’t work when putting down the IF statement in the following form ‘CurrentTime >= 10400 AND CurrentTime <= 030000 THAN (…)’.

    I therefore devised a trade counter that would make the code only execute a single trade.

    The entering into a trade seems to work, I now can’t get the closing of the trade to work, can anyone tell me what I am doing wrong?

    I am also trying to have the trade not attempt a close on saturday and sunday.

     

    #80807

    Welcome to the ProRealCode forums.

    I have moved your topic to the correct forum. You posted in a forum dedicated to PRT platform issues when your question was related to a ProOrder strategy. Please try to post in the correct forum with future topics.

    Also please use the ‘Insert PRT Code’ button when putting code in your posts as it makes it much easier for others to read. I have tidied up your post for you. 🙂

    #80808

    Regarding your question you will need to clarify what time frame you are working in.

    A candle with the time 031500 will only be present in certain time frames. For example there is no 031500 candle in the 1 hour time – only 030000 and 040000.

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