Selling on the close

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #41395 quote
    Despair
    Blocked
    Master

    Is it somehow possible to sell at the close of a bar? I have a strategy running on daily bars and I want that it sells an open position (if it has one) friday att the close so it is flat over weekends. I am unsure how to accomplish that since PRT always evaluates your code at the end of a bar.

    If I put a market order on friday it will not be executed until the open on monday i assume. If I already put it thursday it will be executed friday at the open. So is there a possibility to sell on fridays close for a strategy running on daily bars?

    #41397 quote
    GraHal
    Participant
    Master

    Flat After 235959 … assuming 000000 is market close?

    Or Sell / Exitshort at Time = 235959?

    Just immediate thoughts, feasible?

    #41398 quote
    robertogozzi
    Moderator
    Master

    That would close any open trade daily, not just at/before friday’s closure.

    I’m afraid he (and all of us) will have to wait for the multitimeframe feature when available.

    #41409 quote
    GraHal
    Participant
    Master

    What about something like … ?

    If Longonmarket and Day 5 and Time > 235959
    Sell at market
    Enif
    #41411 quote
    robertogozzi
    Moderator
    Master

    It would do in a 1-min TF, but for the daily TF the strategy is run only AFTER the end of each bar, just before the next one opens (which is on monday in this case)!

    #41427 quote
    GraHal
    Participant
    Master

    ah gotcha, because the condition included a Time I thought as soon as that Time occurs then Trade is exited. Yeah now I think on, I recall it being as you say Roberto, thank you! 🙂

    So it can only be a price level / stoploss or targetprofit that exits a Trade intrabar!? Roll on MultiTimeframe! 🙂

    #41437 quote
    Despair
    Blocked
    Master

    Roberto is absolutely correct, that is the problem. During a bar only pending orders are executed. A market order is executed at the open of the following bar. Your condition Grahal with time=235900 will never come true on a daily timeframe.

    We would need some more new order types implemented in PRT like LimitOnClose/LimitOnOpen/MarketOnOpen/MarketOnClose (LOC/LOO/MOC/MOO).

    #41457 quote
    GraHal
    Participant
    Master

    Despair … put it forward direct to PRT on the Suggestions Form below … you will even get an acknowledgement (wow! :))  using this Form

    https://www.prorealtime.com/en/contact?suggestion=1

    Despair thanked this post
    #41641 quote
    Despair
    Blocked
    Master

    Done. I send along some other wishes i already posted in the thread here on “improvement wishes”. I am unsure if writing in this thread will be seen or if one should always use the form.

    #41687 quote
    GraHal
    Participant
    Master

    I do both generally, on here for benefit of members and on the PRT Contact Form cos – if I’m spending (wasting?)  my time writing – then I want to at least know that PRT see it and send me an acknowledgement email!?

    Also I always only send in just ‘one topic one Contact Form’?

    #41710 quote
    Despair
    Blocked
    Master

    I already send in 7 today. LOL But i am afraid I had several topics within the same form. Well I can do it again. hahaha

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.

Selling on the close


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Despair @despair Blocked
Summary

This topic contains 10 replies,
has 3 voices, and was last updated by Despair
8 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/23/2017
Status: Active
Attachments: No files
Logo Logo
Loading...