| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Hi all. I was recently experimenting with the highest function and the icci function. what i am intending to do is to find the highest point of the cci back about 6 bars, starting one bar back. it compiles perfectly, but the problem is that when i run it through the tester i get weird numbers, which should actually be in the hundreds. check it out!
2006.12.12 19:56:58 2004.01.12 11:06 Power Bit EA v1 EURUSD,Daily: CCI2 = 1.29 here's the string of code being used. PHP Code:
__________________
"One's ability to accomplish his or her goals is limited only by the ingenuity of how one uses what he or she already knows."- Eaglehawk ![]() ![]() REMEMBER, "Genius is nothing but a greater aptitude for patience." –Benjamin Franklin ![]() ![]() ____________________________________ Have a simple ea you just can't figure out how to code??? Odds are you can make it here. Just remember to push complete when you're done, NOT SAVE!!! http://sufx.core.t3-ism.net/ExpertAdvisorBuilder |
|
||||
|
any coders out there have an answer to this problem???
__________________
"One's ability to accomplish his or her goals is limited only by the ingenuity of how one uses what he or she already knows."- Eaglehawk ![]() ![]() REMEMBER, "Genius is nothing but a greater aptitude for patience." –Benjamin Franklin ![]() ![]() ____________________________________ Have a simple ea you just can't figure out how to code??? Odds are you can make it here. Just remember to push complete when you're done, NOT SAVE!!! http://sufx.core.t3-ism.net/ExpertAdvisorBuilder |
|
|||
|
Value is fine. Description of iHighest http://docs.mql4.com/series/iHighest
'iHighest' returns highest BAR and 'High' its value. iCCI has nothing to do with iHighest if you want highest iCCI you need a loop, looping from starting bar util the end Last edited by asmdev; 12-14-2006 at 02:24 AM. |
|
||||
|
Quote:
do you happen to know a way i can return the highest point of a cci?
__________________
"One's ability to accomplish his or her goals is limited only by the ingenuity of how one uses what he or she already knows."- Eaglehawk ![]() ![]() REMEMBER, "Genius is nothing but a greater aptitude for patience." –Benjamin Franklin ![]() ![]() ____________________________________ Have a simple ea you just can't figure out how to code??? Odds are you can make it here. Just remember to push complete when you're done, NOT SAVE!!! http://sufx.core.t3-ism.net/ExpertAdvisorBuilder |
|
||||
|
Quote:
so your saying something like this? PHP Code:
__________________
"One's ability to accomplish his or her goals is limited only by the ingenuity of how one uses what he or she already knows."- Eaglehawk ![]() ![]() REMEMBER, "Genius is nothing but a greater aptitude for patience." –Benjamin Franklin ![]() ![]() ____________________________________ Have a simple ea you just can't figure out how to code??? Odds are you can make it here. Just remember to push complete when you're done, NOT SAVE!!! http://sufx.core.t3-ism.net/ExpertAdvisorBuilder |
|
||||
|
Quote:
so in other words, i have to create a custom array? boy oh boy. looks like no matter how hard i try, i have to use an array at least somewhere. (a friend of mine loves arrays but they take too long for me to program sometimes)
__________________
"One's ability to accomplish his or her goals is limited only by the ingenuity of how one uses what he or she already knows."- Eaglehawk ![]() ![]() REMEMBER, "Genius is nothing but a greater aptitude for patience." –Benjamin Franklin ![]() ![]() ____________________________________ Have a simple ea you just can't figure out how to code??? Odds are you can make it here. Just remember to push complete when you're done, NOT SAVE!!! http://sufx.core.t3-ism.net/ExpertAdvisorBuilder |
|
|||
|
Quote:
for(int i=0; i>=5; i++) maxVal = MathMax(maxVal, iCCi(NULL,0,CCIPERIOD,MODE_CLOSE,i) ); //maxVal is your highest cci value at the end of loop. |
|
|||
|
double maxVal = -99999;
int bar = 0; for(int i=0; i>=5; i++){ double cci = iCCi(NULL,0,CCIPERIOD,MODE_CLOSE,i) ; if(cci > maxVal){ bar = i; maxVal = cci; } } "bar" is the bar where cci is max and maxVal is your highest cci at the "bar". I never used iCCIOnArray but you can give it a try. You'll need to define array somewhere. |
|
||||
|
Quote:
Thanks for your assistance, it's nice to learn new functions like this. every once in a while, several problems wash away from one answer. I LOVE IT!
__________________
"One's ability to accomplish his or her goals is limited only by the ingenuity of how one uses what he or she already knows."- Eaglehawk ![]() ![]() REMEMBER, "Genius is nothing but a greater aptitude for patience." –Benjamin Franklin ![]() ![]() ____________________________________ Have a simple ea you just can't figure out how to code??? Odds are you can make it here. Just remember to push complete when you're done, NOT SAVE!!! http://sufx.core.t3-ism.net/ExpertAdvisorBuilder |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Martingale and other high risk high reward systems | TraderGeek | General Discussion | 15 | 05-03-2007 05:59 AM |
| High-High/Low-Low indicator | trevman | Indicators - Metatrader 4 | 5 | 01-07-2007 04:39 AM |
| High/Low value? | benitohau | Questions | 1 | 09-16-2006 07:04 PM |
| Function for high and low | maje | Setup Questions | 3 | 05-16-2006 12:23 PM |
| High/Low EA | forexpipmaster | Metatrader 4 | 1 | 02-12-2006 07:37 AM |