Forex



Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 12-13-2006, 03:05 AM
Eaglehawk's Avatar
Senior Member
 
Join Date: Jun 2006
Posts: 141
Eaglehawk is on a distinguished road
Cool High CCI

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:
       double CCI2 High[iHighest(NULL,0,iCCI(NULL,0,CCIPERIOD,MODE_CLOSE,0),6,1)];
  Print(
"CCI2 = ",CCI2); 
just so everyone knows, CCIPERIOD is an integer i assigned to 14 in my global variables.
__________________
"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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 12-14-2006, 03:00 AM
Eaglehawk's Avatar
Senior Member
 
Join Date: Jun 2006
Posts: 141
Eaglehawk is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 12-14-2006, 03:21 AM
Member
 
Join Date: Dec 2005
Posts: 68
asmdev is on a distinguished road
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 03:24 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 12-14-2006, 03:23 AM
Senior Member
 
Join Date: Mar 2006
Posts: 793
Maji is on a distinguished road
I believe you have to use iCCIOnArray as iHighest works on arrays.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 12-14-2006, 03:24 AM
Eaglehawk's Avatar
Senior Member
 
Join Date: Jun 2006
Posts: 141
Eaglehawk is on a distinguished road
Quote:
Originally Posted by asmdev
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
ok. that's been one thorn of confusion in my side, with the whole, "Returns shift". which i've kinda guessed how to figure out.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #6 (permalink)  
Old 12-14-2006, 03:25 AM
Eaglehawk's Avatar
Senior Member
 
Join Date: Jun 2006
Posts: 141
Eaglehawk is on a distinguished road
Quote:
Originally Posted by Maji
I believe you have to use iCCIOnArray as iHighest works on arrays.
Thanks for the reply. I appreciate your input everyone.

so your saying something like this?

PHP Code:
High[iCCI(NULL,0,CCIPERIOD,MODE_CLOSE,5)]; 
and that will give me the highEST point back 5 bars
__________________
"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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #7 (permalink)  
Old 12-14-2006, 03:31 AM
Eaglehawk's Avatar
Senior Member
 
Join Date: Jun 2006
Posts: 141
Eaglehawk is on a distinguished road
Quote:
Originally Posted by asmdev
if you want highest iCCI you need a loop, looping from starting bar util the end
Thanks for the speedy replies everyone.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #8 (permalink)  
Old 12-14-2006, 04:42 AM
Member
 
Join Date: Dec 2005
Posts: 68
asmdev is on a distinguished road
Quote:
Originally Posted by Eaglehawk
find the highest point of the cci back about 6 bars, starting one bar back
double maxVal = -99999;
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #9 (permalink)  
Old 12-14-2006, 04:46 AM
Member
 
Join Date: Dec 2005
Posts: 68
asmdev is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #10 (permalink)  
Old 12-14-2006, 04:47 AM
Eaglehawk's Avatar
Senior Member
 
Join Date: Jun 2006
Posts: 141
Eaglehawk is on a distinguished road
Quote:
Originally Posted by asmdev
double maxVal = -99999;
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.
wow! let me tell you. with so many people pointing me back to a "math" function like mathmod, mathmax, i think that should be my next area of study, lol.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
High/Low EA forexpipmaster Metatrader 4 15 10-29-2009 12:31 PM
Martingale and other high risk high reward systems TraderGeek General Discussion 15 05-03-2007 06:59 AM
High-High/Low-Low indicator trevman Indicators - Metatrader 4 5 01-07-2007 05:39 AM
High/Low value? benitohau Questions 1 09-16-2006 08:04 PM
Function for high and low maje Setup Questions 3 05-16-2006 01:23 PM


All times are GMT. The time now is 07:23 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.