Forex Forums | ForexLasers.com


Go Back   Forex Lasers Forum > METATRADER FORUM > Expert Advisors / Robots


Count Bars from indicator

Expert Advisors / Robots


Reply
 
LinkBack Thread Tools Search this Thread
  #1  
Old 25-04-2019, 18:15
Level 1 Lasers Member
 
Join Date: Apr 2019
Posts: 1
Default Count Bars from indicator

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!
Attached Thumbnails
Count Bars from indicator-snap.jpg  
Attached Files
File Type: mq4 ATT_1 - ForexTrend_v2.mq4 (2.9 KB)
File Type: mq4 ATT_2 - Test_EA.mq4 (7.9 KB)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Baker Hughes rig count at the top of the hour Forex News Latest Industry News 0 14-06-2019 17:30
‘Am I missing bars in my chart?’ two simple indicators to show you – indicator for Me Metatrader Indicators FX Indicators Download Database 0 20-03-2018 21:30
Multi Time Frame Bars Visualization v1.5 – indicator for MetaTrader 4 Metatrader Indicators FX Indicators Download Database 0 01-03-2018 14:59
How to Trade Fake Pin Bars ForexArticles Forex Articles 0 26-07-2017 23:20
dividing volume from price bars blackberrygod Indicators Discussion 1 25-06-2010 03:30


All times are GMT. The time now is 22:09.


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