| 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 (1) | Thread Tools | Display Modes |
|
|||
|
Quote:
int iHighest( string symbol, int timeframe, int type, int count=WHOLE_ARRAY, int start=0) set the count to "Bars" so. iHighest(NULL, 0, 3, Bars, 0); At least that what I think would work. Just check in your chart settings how many bars you keep in history. Default I think is 52,000 bars. |
|
|||
|
That works for price. He's wanting to find the highest and lowest of an idicator.
Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV ![]() ForexArea.com Users of Gap Trader from 'Forex-Assistant' MUST Read This |
|
|||
|
Hello,
You can try this : Code:
....
int highest=0, lowest=0, bar=WindowBarsPerChart();
for(int shift=0;shift<bar;shift++)
{
double indie=iCustom(.........,shift);
if(highest<indie) highest=indie;
if(lowest==0) lowest=indie;
if(lowest>indie) lowest=indie;
}
.....
Hope this helps, Ardie
__________________
Need a professional MQL4 programmer? PM me |
|
||||
:: iBarShift will find for you the bar that start on that day/hour... or also the end bar for that day:hour... (depends what timeframe or chart you want to start to find your high/low).
__________________
..4.Nov.08.. IN10TION newsReader v09.85 Lite - the best news reader on your chart
|
|
|||
|
Programmaticaly refresh the repaint indicator
Hello,
I'm looking to find a way to refresh a repaint indicator for every x minutes. The only way to refresh it currently, is to click in the indicator on the chart and then click "ok". Can we automate it with MQL4 code? I found something on codersguru's site, Programmatically Refresh your charts | www.metatrader.info, but it seems not working for me. Or is there anybody has try it and get different result (working)? Thank you
__________________
Need a professional MQL4 programmer? PM me Last edited by Devil2000; 06-30-2008 at 02:40 PM. |
|
|||
|
Quote:
PHP Code:
PHP Code:
Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV ![]() ForexArea.com Users of Gap Trader from 'Forex-Assistant' MUST Read This |
|
||||
|
That was nice of you, Lux.
I found this: Only process each bar once - MQL4 forum Automated 2008.01.15 18:54 You could execute your code at the very first tick of a new bar ( i.e. right after the previous bar has closed ). Here's a function that will return TRUE if a new bar has just formed: // This function returns TRUE at the very first tick a bar i.e. after the previous bar has just closed bool NewBar() { if(PreviousBarTime<Time[0]) { PreviousBarTime = Time[0]; return(true); } return(false); // in case if - else statement is not executed } you need to declare datetime PreviousBarTime at the beginning of your EA... then in your code you could just use if ( NewBar() ) { ...... code you need to be executed after a bar has closed here .... } thank you automatedfx@gmail.com --------------------------------------------------- I noticed you used STATIC... I looked it up... what's the advantage of using STATIC vs a global variable? Last edited by TheRumpledOne; 07-02-2008 at 01:55 AM. |
|
|||
|
multiple entry ea
please help. i would like to find or need help creating an ea with the following input parameters. four separate trade entries each having no. of lots, stop loss, trailing stop, break even, and profit target. trades will open upon clicking on expert advisor button.
thank you Last edited by cresp; 07-03-2008 at 02:13 AM. |
|
|||
|
Need help on trailing stop option
I found this EA at MQL4 forum, quite an interesting EA.
could somebody help to add a trailing stop option which can set trailing stop only activate after the hit profit value that I set? TheMasterMind2.mq4 |
![]() |
| Bookmarks |
| Tags |
| candle time, CHinGsMAroonCLK, coders guru, expert advisor, forex, how to code, I_XO_A_H, mechanical trading, trading |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/metatrader-programming/554-how-code.html
|
||||
| Posted By | For | Type | Date | |
| Need an experienced programmer? - Page 2 | Post #0 | Refback | 09-24-2008 07:24 AM | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to code this? | iscuba11 | Metatrader 4 mql 4 - Development course | 1 | 08-03-2007 05:22 PM |