Not logged in
Viewing 8 posts - 1 through 8 (of 8 total)

Forums>AlgoWizard / EA Wizard>Application Support>Do action after X Bars / Hours when last order was closed

  • #233386 |
    Conmariin
    Customer
    116 Posts

    Hi,

    I’m trying to do an action after x bars or hours when last order (long or short) was closed. I tried it with BarsSinceOrderClosed(0) = 24. But it doesn’t seem to have an effect. Any ideas how to solve this problem?

    Thanks! :-)

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

    #233393
    tomas262
    Administrator
    1826 Posts

    Hello,

    the function can be used like shown in the example attached

    Attachments:
    You must be logged in to view attached files.
    #233401
    Conmariin
    Customer
    116 Posts

    Hm, in my case the action is to set support and resistance lines when above rule is true. But then it never ends. Because it’s always >5 or the last closed order was flat like in your example. So it is setting with every new bar the s and r lines. It looks funny how the price is chasing the lines. :D But I don’t want to avoid trades. :D

    So after the lines are set there must be a “pause” until next order is opened. Hm…that’s tricky..every idea is welcome. :)

    Thanks!

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

    #233413
    Conmariin
    Customer
    116 Posts

    I have another idea. When the highest high of the last 12 bars was smaller than the Support Line then set Support line new.
    I tried with Highest(12) [1] < newSuppPrice (where newSuppPrice has the value from the Support Line calculated before). But that doesn’t work.

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

    #233414
    tomas262
    Administrator
    1826 Posts

    Hello,

    please show how you did that exactly. You can attached zipped project or send us directly to support@strategyquant.com

    #233420
    Conmariin
    Customer
    116 Posts

    Hi Tomas,

    I sent you an email to support@strategyqant.com :)

    Thanks!

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

    #233421
    Conmariin
    Customer
    116 Posts

    Forgotten…next think I tried was the idea when High of the last X bars was < Support then set Support Lines new.

    But that doesn’t work either. :(

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

    #233576
    Conmariin
    Customer
    116 Posts

    After all Tomas helped me out to get an solution for my S and R problem. Here is the sqw for you. A good basis to work with SandR-EAs. :-)

    Thanks for this great support, Tomas! :-)

    Attachments:
    You must be logged in to view attached files.

    Automatisches Handeln mit Expert Advisor
    https://www.rabenesche.de

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

You must be logged in to reply to this topic.