| 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 |
|
|||
|
Thanks, Maji. It helped. Correct me if I am wrong:
1. IndicatorCounted is useful in charts whose bars are updated in real time. So, instead of re-calculating the indicator values for all the bars when a new bar appears, only the indicator value for this new bar is calculated. 2. "limit" is simply the number of new bars, for which the indicator has to be calculated. 3. The indicator index [i] counts bars backwards, with i=0 indicating the new (current) bar. I guess my confusion was based on my prior experience with Wealth-Lab, where an indicator code is written such that the indicator values are calculated for all the bars even if only the new bars need to be calculated. However, Wealth-Lab has some built-in smartness and it is possible that the indicators are automatically re-calculated for the new bars only. I am getting a feeling that MQL4 does not want make such decisions for you and leave these decisions to you by forcing you to make extra programming steps. I actually like that because I always hate when a software makes decisions for you and these decisions are not the same as yours. My only problem with MQL4 is that I wish it had better documentation. |
|
|||
|
fiqe,
I believe your assumptions are right. i think MT4 is right in just calculating the indicators once and WL hogs resources doing it the other way. I maybe wrong, and I hope others more knowledgeable can correct both of us. |
|
||||
|
OK , I think U can do this like that:
First u have to point what hour are u searching - if your broker is GMT+3 then to count Pivots on GMT time u have to decerase brokers time by 3. So If u search for hour 00.00 u will search for 21.00 at your broker time. Now, one day is 24 hours and we start to search from right part of the screen. Your broker time is +3 so we will be adding that numbet to shift value. Code:
for(int i = 3 ; i <= 27 ; i++)
{
if(TimeHour(Time[i])==21)
{
//This should be your GMT midnight so u can take OHLC values from here
double open = iOpen(Symbol(),60,i);
double high = iHigh(Symbol(),60,i);
double low = iLow(Symbol(),60,i);
double close = iClose(Symbol(),60,i);
}
}
__________________
You need proffesional mql coder? Contact me! I will help you! ........................................ http://www.fxservice.eu/ ........................................ |
|
||||
|
Hi,
In the last version of SimpleDailyRangeBreakoutExpert you can find code for making of candle(OHLC) for any time zone.
__________________
Let's improve trade skills together http://finance.groups.yahoo.com/group/TrendLaboratory |
|
|||
|
Can anyone code these Trading indicators?
Check the link, look down the page then click on to the trading indicators. They look Vgood.
http://www.trendpro.com/floortraders.html |
|
|||
|
how i do code order sell & order buy?
Hello my freinds
now , i went to do code to order sell and code to order buy .. what`s codes to write it in my expret ? and the expret give alert when the sign appear to sell or buy. and thank you for all Last edited by mmf; 09-22-2006 at 01:55 AM. |
|
||||
|
Quote:
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to code this? | iscuba11 | Metatrader 4 mql 4 - Development course | 1 | 08-03-2007 04:22 PM |