Reply

Do action after X Bars / Hours when last order was closed

7 replies

Conmariin

Subscriber, bbp_participant, community, customer, 54 replies.

Visit profile

6 years ago #233386

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

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

5 years ago #233393

Hello,

the function can be used like shown in the example attached

0

Conmariin

Subscriber, bbp_participant, community, customer, 54 replies.

Visit profile

5 years ago #233401

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. 😀 But I don’t want to avoid trades. 😀

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

0

Conmariin

Subscriber, bbp_participant, community, customer, 54 replies.

Visit profile

5 years ago #233413

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

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

5 years ago #233414

Hello,

please show how you did that exactly. You can attached zipped project or send us directly to [email protected]

0

Conmariin

Subscriber, bbp_participant, community, customer, 54 replies.

Visit profile

5 years ago #233420

Hi Tomas,

I sent you an email to [email protected] 🙂

Thanks!

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

0

Conmariin

Subscriber, bbp_participant, community, customer, 54 replies.

Visit profile

5 years ago #233421

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

0

Conmariin

Subscriber, bbp_participant, community, customer, 54 replies.

Visit profile

5 years ago #233576

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

0

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