Forex Forum - EarnForex
Serving Traders Since 2005
 

Go Back   Forex Forum - EarnForex > MetaTrader > MetaTrader 5

MetaTrader 5 MT5 is already out of its beta stage, but the development is ongoing. Some brokers already offer real accounts and the interest of traders is growing. You can discuss anything related to MetaTrader 5 in this forum.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 4th September 2011, 10:32
Default Avatar
Senior Member
 
Join Date: Aug 2011
Posts: 115
Thanks: 0
Thanked 0 Times in 0 Posts
Default High Array max

Hi

Is there a function which returns the index of the highest high between a start and end indexs inside the OnCalculate?

thx
Reply With Quote
  #2 (permalink)  
Old 5th September 2011, 08:22
Enivid's Avatar
Administrator
 
Join Date: Nov 2008
Posts: 1,548
Thanks: 18
Thanked 20 Times in 16 Posts
Default

Should work:

MQL5 Code:
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &High[],
                const double &Low[],
                const double &Close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
{
 int highest_index = ArrayMaximum(High);
 return(rates_total);
}
__________________
Please, read the Forum Rules and the Signature Rules to avoid termination of your account.
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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CAD Reaches Three-Year High vs. USD autoforex Advertisements 0 23rd July 2011 03:04
High Probability Signals forextss Advertisements 4 7th March 2011 11:59
High Accurate Automated System ilyasawan77 Advertisements 0 24th December 2010 18:51
5K high performance managed accounts FX Managed Investments Advertisements 0 13th April 2010 04:38
FREE high win trading system sharpblademaster Trading Systems and Strategies 9 6th October 2009 08:51


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


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Inactive Reminders By Icora Web Design

SEO by vBSEO 3.3.2