in Search

MS Pro intraday trade: exit end of day

Last post 06-25-2009, 16:49 by manatrader. 4 replies.
Sort Posts: Previous Next
  •  06-19-2009, 16:49 29948

    MS Pro intraday trade: exit end of day

    Well, maybe I'm searching the forum for the wrong term, using 'end of day' includes lots of MS EOD results. I'm wanting to code an exit for intraday trades at end of day, like for 5 min bars I'd add to other exit rules.........:

    "or current bar 3:55pm"

    Thanks!
  •  06-19-2009, 17:49 29949 in reply to 29948

    Re: MS Pro intraday trade: exit end of day

    There are functions that allow you to reference time, i.e. Hour(), Minute(). Hours should follow a 24-hour clock. So a simple formula of:

    Hour() = 8 AND Minute() = 45 would trigger when the time was equal to 8:45 AM. You will always want to make sure to pick a time that exists in the relevant periodicity. In other words, Hour()=8 AND Minute() = 45 would not trigger on a 10-minute chart where the bars are stamped 8:10, 8:20, 8:30, 8:40, 8:50.
  •  06-19-2009, 18:19 29950 in reply to 29948

    Re: MS Pro intraday trade: exit end of day

    See also: http://forum.equis.com/forums/post/29444.aspx


    wabbit Big Smile [:D]


    "The question of whether a computer can think is no more interesting than the question of whether a submarine can swim."
    Edsgar W. Dijkstra

     

    MS: 6.52 EOD, 7.x EOD, 8.0 PRO, 9.2 PRO w/QC, 10 PRO w/QC & MDK
    For custom MetaStock programming : http://www.wabbit.com.au
    My SkyPE status :
    My SkyPE account : wabbit.com.au

  •  06-19-2009, 22:35 29953 in reply to 29949

    Re: MS Pro intraday trade: exit end of day

    Awesome, and it's right in the gdang manual as always. Thanks guys
  •  06-25-2009, 16:49 29991 in reply to 29949

    Re: MS Pro intraday trade: exit end of day

    EDIT-forum won't let me delete post, problem was due to using NY time instead of local..

    D'oh!


    Whoops, for some reason it isn't working. In addition to other buy/sell rules, I've added

    entry 'and hour()>9 and hour()<15'

    exit 'or (hour()=15 and minute()=50)'

    This is on a 2 minute bar test.. Any ideas?
    Thanks
    :)
View as RSS news feed in XML