Not logged in
Viewing 9 posts - 1 through 9 (of 9 total)
  • #111670 |
    Participant
    18 Posts

    Enclosed is my strategy. The strange thing is:

    When I deleted all the rules after 8(3) and 8(4), I was able to close the trades at the specific times in 8(3) and 8(4) when the required condition, i.e. Open (P/L) > 0 is satisfied. Once I added all the rules after 8)3) and 8(4), no trades were closed at those specific times. Actually, all the rules after 8(3) and 8(4) could not be executed either. Why?  

    Attachments in this forum are visible only for registered users.
    #122868
    Participant
    18 Posts

    Please see my greatly shortened strategy. There is only 1 rule. It appears that the Time and Hour values do not work, since I was never able to close any existing trades if these values are GMT.

    #122869
    Participant
    18 Posts

    Sorry. My shortened strategy is as follows.

     

    I AM UNABLE TO ATTACH THE STRATEGY. Please see my email.

    #122872
    Participant
    18 Posts

    I am able to upload my sqw file now. Please note that thte Hour and Minute values are clearly not GMT values, since when I tested them, my pending orders (created previously) were not closed at GMT values after checking with my clock. Even after I changed the rule to TimeCurrent (I assume it to be GMT value also), in the format X(hour)Y(min)Z(second), I still was not able to close the orders. I used to be able to close the orders using the 2.0 version.

    Attachments in this forum are visible only for registered users.
    #122876
    Participant
    18 Posts

    I have found that the condition

    Time (0) = GetTime(Hour.Minute.Second) works. But not Hour (0), Minute (0).

    #122879
    Participant
    18 Posts

    The GetTime function seems to work only a few times. Now it is not working.

    #122884
    Participant
    18 Posts

    After the market opened today, GetTime Function worked. But after I changed the time a couple of times, it failed to work again.

    #122887
    Participant
    18 Posts

    I have discovered that if I change the time frequently, like every 3-4 minutes, GetTime will NOT work. If I wait for 10-12 hours before changing the time, GetTime would work.

    #122914
    Mark Fric
    Administrator
    1182 Posts

    the problem could be in your comparison. Time returns opening time of current bar, so it changes only once per hour if you trade on 1 hour bars.

     

    You can use TimeCurrent if you want to see actual time value of every tick.

    Mark
    StrategyQuant architect

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

You must be logged in to reply to this topic.