Sell Order entry at or near close of trading

Forums ProRealTime English forum ProOrder support Sell Order entry at or near close of trading

Viewing 10 posts - 1 through 10 (of 10 total)
  • #76129

    The above doesn’t work is there any way this can be achieved please. I want to place the “sell order” at the end of the day provided the current price is above yesterday’s close. I am intending to trade the daily chart.

    Dymjohn

    #76130

    There is no time of 205500 or 205900 on daily candles which is why it does not work. You would need to be on a minute chart to have a candle for the time of 205900.

    #76133

    thanks Vonasi

    Is there no way of placing an order to open at the end of the day whilst Auto trading on daily charts? My thoughts were that when a setup occurs in volatile markets you don’t want to wait until the open of the next day when there is likely to be a large gap in price.

    #76135

    All decisions are made at the close of a candle so the only way to enter part way through a day is to trade a shorter time frame chart or place stop and limit orders at the previous candles close. On a daily chart nothing can be changed or decided until the days candle has closed. Multi Time Frame is being trialled at the moment and might help you get closer to what you want to do. It should be available for testing on IG/PRT Demo accounts tomorrow hopefully.

    1 user thanked author for this post.
    #77585

    Hi,

    So is they anyway to close orders just before the end of the trading day so no orders are held overnight. I’m not sure the FLATDEPRAM is working

    #77586

    Not on a daily time frame as there is only one time for a daily candle. If you switch to faster time frames then you can stop trading at any time that is represented by a candle on the chart. So hourly chart means you can stop trading or close positions at 2100, 2200, 2300 etc On a 30 minute chart 2100, 2130, 2200, 2230, 2300 are all available. Switch to a 1 minute chart and 2159 becomes available.

    As I mentioned MTF which is being tested in demo at the moment will allow you to do this – you can make trading decisions on a daily chart and then close positions at 2159 on a minute chart.

    DEFPARAM FLATAFTER will close all positions but only if a candle with the time you specify exists on the chart you are trading on.

    1 user thanked author for this post.
    #77588

    Hi Vonasi,

    Your reply really cleared things up.

    I am trading on a 15 minute timeframe and have been using the following code. However the algo is still creating orders at 15:30 on one day and not closing them till 14:50 the next day. I believe I am using the DEFPARAM FLATAFTER function correctly but if I am not would love some guidance.

    Kind Regards,

    Simone

     

    #77604

    The code looks fine for a fifteen minute chart. The only suggestion would be to move the DEFPARAM FLATAFTER to the beginning of the code. I don’t know whether this is the problem or whether PRT cares about the location but I have always seen all the DEFPARAM’s as the first lines of code before rather than buried in the code.

    #77659

    All DEFPARAM must be at the beginning of the code, otherwise ProBacktest will throw errors.

    #77660

    All DEFPARAM must be at the beginning of the code, otherwise ProBacktest will throw errors.

    Thanks for confirming that Nicolas. Something in the back of my mind told me that that was the case. Maybe the documentation should be updated to show this?

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

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