Forex Lasers Forum

Forex Lasers Forum (
-   Expert Advisors / Robots (
-   -   Count Bars from indicator (

andypenez 25-04-2019 18:15

Count Bars from indicator
3 Attachment(s)
Hi, have the following problem, I would like to use a trend indicator in my strategy (see Att_1).
In my test EA (see Att_2) is an example for OpenBuyOrder with MACD and for CloseLongPositions with ForexTrend_v2, currently only with value = 1.

How can I now determine that CloseLongPositions is only executed if the trend bars are at red for five periods or bars (see bottom snapshot), if they are less than five then nothing should be done!

Have tried everything possible with operands FOR, PeriodSeconds () .. unfortunately without success.

Thank you in advance for your help!

All times are GMT. The time now is 23:32.

Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2021, vBulletin Solutions, Inc.