Menu
Brokers
MT4 Forex Brokers
MT5 Forex brokers
PayPal Brokers
Skrill Brokers
Oil Trading Brokers
Gold Trading Brokers
Web Browser Platform
Brokers with CFD Trading
ECN Brokers
Bitcoin FX Brokers
PAMM Forex Brokers
With Cent Accounts
With High Leverage
Cryptocurrency Brokers
Forums
All threads
New threads
New posts
Trending
Search forums
What's new
New threads
New posts
Latest activity
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Reply to thread
Forums
Trading Platforms
MetaTrader 5
Alert after every candle close
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
[QUOTE="Enivid, post: 193923, member: 1"] The arrow array (arrowar) you are checking for a Buy alert isn't zero by default. When there is no arrow, the array's value is EMPTY_VALUE. So, you need to change [ICODE]> 0[/ICODE] to [ICODE]!= EMPTY_VALUE[/ICODE]. However, this won't fix everything for you. You also need to check color array (arrowcl you are checking for a Sell alert) to determine whether it is a Buy or Sell signal. arrowar assumes a non-empty value whenever there is any signal at all - be it Buy or Sell. Then the arrowcl array is changed based on whether it is a Buy (0) or Sell (1), so your two conditions have to look like this: [CODE=mql5]if ((arrowar[rates_total - 1 - TriggerCandle] != EMPTY_VALUE) && (arrowcl[rates_total - 1 - TriggerCandle] == 0) && ((TriggerCandle > 0) || ((TriggerCandle == 0) && (LastAlertDirection != 1))))[/CODE] [CODE=mql5]if ((arrowar[rates_total - 1 - TriggerCandle] != EMPTY_VALUE) && (arrowcl[rates_total - 1 - TriggerCandle] == 1) && ((TriggerCandle > 0) || ((TriggerCandle == 0) && (LastAlertDirection != -1))))[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Top
Bottom
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…