Serving Traders Since 2005
|
|
|
|||||||
| MetaTrader Indicators Post and discuss the MetaTrader indicators here. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
You need to create a custom indicator that uses the standard CCI indicator. You need to check the current value of CCI and the previous value of CCI - if the current is >= 0, while the previous is < 0 then an alert should be issued. If the current value is < 0 and the previous value is >= 0 then an alert should be issued.
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
You can't do this in MT5:
CCI[i]=iCCI(NULL,0,14,PRICE_CLOSE); You have to get the indicator handle first and then copy its values into a buffer. Similar to this: int myCCI = iCCI(NULL,0,14,PRICE_CLOSE); if (CopyBuffer(myCCI, 0, 0, rates_total, CCI_Buffer) != rates_total) return(0); You'll also want your OnCalculate() to run only on new bar openings - otherwise you'll get a lot of alerts after each cross.
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
Quote:
Thanks |
|
||||
|
You need to write the rates_total (amount of bars) into some global variable and check in OnCalculate() if the new rates_total is different from the old one. If it is, then remember a new amount and proceed to the rest of the function, otherwise return from the function.
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
Quote:
Look at some of my indicators here: http://www.earnforex.com/metatrader-indicators Look for variable LastBars and what's done with it.
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account. |
|
||||
|
Despite the bad press I have found them to be very good. Just stay away from numismatics and stick to bullion. When I last bought their margin above spot was very competative. The best part is that they a super professional. They are always in constant communication about your order. Highly trust worthy. Would use again.
__________________
Osbaldo |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| TRADE ALERT | eja | Advertisements | 0 | 19th October 2010 11:42 |
| TRADE ALERT | eja | Advertisements | 0 | 18th October 2010 10:44 |
| TRADE ALERT | eja | Advertisements | 0 | 14th October 2010 08:34 |
| TRADE ALERT | eja | Advertisements | 0 | 13th October 2010 08:44 |
| TRADE ALERT | eja | Advertisements | 0 | 12th October 2010 07:24 |