How long are stop and limit orders valid for?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #84485 quote
    MarcMarc
    Participant
    Average

    Hi together,

    How long is an order valid? Until end of trading day or period?

    As Example:
    My EA’s period is on hourly basis. When I place a stopp or limit at 10 o’clock will this order be cancelled at end of trading day or after 10:59:59?

     

    Thank you
    Marc

    #84488 quote
    NicolasNicolas
    Keymaster
    Legend

    If the orders you are talking about are pending ones, they last 1 bar. So if your strategy is running on a daily timeframe, the orders will expire the next day, at Close.

    Marc thanked this post
    #84493 quote
    VonasiVonasi
    Moderator
    Master

    On the 1 hour chart candles/bars last 1 hour so your pending orders will last one hour and be deleted at the close of the bar.

    I will edit your topic title to make it a little easier to understand.

    Marc thanked this post
    #84685 quote
    MarcMarc
    Participant
    Average

    Thank you very much for your help.

    Is it possible to extend period until deletion?

     

    Thank you in advance
    Marc

    #84689 quote
    NicolasNicolas
    Keymaster
    Legend

    No, but you can put the pending order continuously at each new bar in the code with a simple condition:

    if PendingConditions=1 then //still true to put pending orders
     buy 1 share at dhigh(0) stop
    endif
    Marc thanked this post
    #84699 quote
    MarcMarc
    Participant
    Average

    great 🙂 thank you

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

How long are stop and limit orders valid for?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Marc @mast83 Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by MarcMarc
7 years, 11 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/09/2018
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...