Not logged in
Viewing 7 posts - 1 through 7 (of 7 total)
  • #191551 |
    Participant
    16 Posts

    I want to refer to the bar when a pending order triggers a trade ie. where the pending order has become an actual open trade.
    Using ‘order opened this bar’ will include pending orders, which I don’t want.
    Using ‘market position is long/short’ will include all bars of the trade duration.

    How do I achieve this?

    #191560
    Mark Fric
    Administrator
    1182 Posts

    this doesn’t look like something to configure in StrategyQuant 3, are you trying to build strategy like this in Wizard?

    I think you can combine these two conditions- Order Opened This Bar AND Order Position Is Long.
    If you’ll use specific Magic Number it should give you what you want, shouldn’t it?

    Mark
    StrategyQuant architect

    #191563
    Participant
    16 Posts

    Thanks very much for your reply. Yes, I should have specified, sorry – this is building a strategy in Wizard.
    If I use the two conditions, will the EA count the trade opening as an ‘order opened this bar’, even though the pending order was placed on previous bars?

    #191659
    tomas262
    Administrator
    1823 Posts

    Hello,

    you can refer to that bar also using a simple bar counter. The bar counter will provide you with a number of bars in trade (barsInTrade variable). Then you can reference the bar prices like for example Close[barsInTrade]. See the file attached

    Attachments:
    You must be logged in to view attached files.
    #191745
    Participant
    16 Posts

    Thank you very much, that’s very clever.

    Just for my understanding, is not the ‘is bar open’ function used in the example achieved by ticking the box ‘Evaluate rule on bar open only’,
    or is this something different?

    Thanks again, I appreciate you taking the time!

    #191781
    tomas262
    Administrator
    1823 Posts

    Hello,

    these are the same. I like to use the condition especially in time when you do not have anything else to setup. You just need some action exactly on bar open

    #191807
    Participant
    16 Posts

    OK, thank you very much.

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

You must be logged in to reply to this topic.