Wont BUY First day of month if its a Monday 

Forums ProRealTime English forum ProOrder support Wont BUY First day of month if its a Monday 

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • #157164

    Wont BUY First day of month if its a Monday

     

    I noticed inconsistent proorder behaviour with the following code:

     

    The above code is intended to buy the first bar of Nov and sell after month end.

    Bug: If the first bar of the month is a Monday, the signal trigger a bar late.

    #157167

    Because Month is the month when a bar closes, while OpenMonth when a bar opens.

    So if Oct.31st is when market is closed there’s no bar and the beginning of the next month cannot be detected until the nexr bar closes, that is when the Monday bar closes in this case.

    But it would be the same on a, say,Wednesday if the previous day markets were closed.

     

    #157168

    Not going to be hard for PRT to code that in . Its all known in advance . Just makes a seasonal monthly test inaccurate  .  i think PRT CAN solve it , its just whether they want to   .   Anyway now anyone knows buying month = is getting flawed results  .

     

    I did note Nicholas wrote a last trading day of month code somewhere before , will see if i can find it . Maybe a first trading day of month companion code can be written

    #157169
    KDH

    I have encountered this same issue and it is frustrating.

    Can anyone suggest 100% working code for how to buy on the open on the first day of the month?

    #157170

    Brisvegas – Your post has been edited.

    • Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read.
    #157171

    Can anyone suggest 100% working code for how to buy on the open on the first day of the month?

    Use MTF to get you on the market at the opening of the 2nd 1 second candle of the month.

     

    Not tested.

    1 user thanked author for this post.
    avatar KDH
    #157269

    Last day of trading of the month code snippet and explanation can be found here: https://www.prorealcode.com/topic/coding-help/#post-46525

    Link to many other useful snippets: https://docs.google.com/spreadsheets/d/1rgboqj7sVwsP9ZRhOduOefye48QMWC07jWVXCl-KJPU/edit#gid=0

    2 users thanked author for this post.
Viewing 7 posts - 1 through 7 (of 7 total)

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