Forex
Google
New signals service!

Go Back   Forex Trading > Programming > Metatrader Programming


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

Reply
 
LinkBack Thread Tools Display Modes
  #141 (permalink)  
Old 09-03-2006, 08:17 PM
Junior Member
 
Join Date: Aug 2006
Posts: 6
fiqe8j4 is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #142 (permalink)  
Old 09-03-2006, 09:03 PM
Senior Member
 
Join Date: Mar 2006
Posts: 787
Maji is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #143 (permalink)  
Old 09-06-2006, 12:20 AM
Nicholishen's Avatar
Senior Member
 
Join Date: Dec 2005
Posts: 531
Nicholishen is on a distinguished road
Question Code puzzler!

I am having some trouble figuring out the best way to solve calculating pivots based on GMT. Can anyone tell me how to have an EA calculate the OHLC of the previous day, however the day’s OHLC is based on 0GMT – 23GMT and the broker time is using GMT+3. I know it would be Highest(),Lowest(),iClose(), but how do you return the “shift” of the bar that starts at 0GMT of the previous day?
__________________
"Anyone who has never made a mistake has never tried anything new." -Albert Einstein
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #144 (permalink)  
Old 09-06-2006, 01:28 AM
Senior Member
 
Join Date: Mar 2006
Posts: 787
Maji is on a distinguished road
Nick,

Check your email. I have sent you an example there.

Let me know.

Maji
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #145 (permalink)  
Old 09-06-2006, 05:59 AM
Kalenzo's Avatar
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 693
Kalenzo is on a distinguished road
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);
     }
     
}
I don't know if this is a simple way, but it works.
__________________
You need proffesional mql coder? Contact me! I will help you!
........................................
http://www.fxservice.eu/
........................................
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #146 (permalink)  
Old 09-06-2006, 06:05 AM
igorad's Avatar
Senior Member
 
Join Date: Oct 2005
Location: Ukraine
Posts: 800
igorad is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #147 (permalink)  
Old 09-06-2006, 09:16 AM
Nicholishen's Avatar
Senior Member
 
Join Date: Dec 2005
Posts: 531
Nicholishen is on a distinguished road
Sorry, I forgot to specify that i am looking for the daily OHLC based on GMT where broker os not. I will check out the code... THANKS!
__________________
"Anyone who has never made a mistake has never tried anything new." -Albert Einstein
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #148 (permalink)  
Old 09-12-2006, 11:15 AM
Senior Member
 
Join Date: Jan 2006
Location: 3rd rock from the sun
Posts: 131
fred is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #149 (permalink)  
Old 09-22-2006, 01:48 AM
mmf mmf is offline
Junior Member
 
Join Date: Jun 2006
Posts: 9
mmf is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #150 (permalink)  
Old 09-22-2006, 06:45 AM
fotovat's Avatar
Member
 
Join Date: May 2006
Posts: 74
fotovat is on a distinguished road
Quote:
Originally Posted by mmf
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
You can read the MQL programming guide , it's a very basic question and you will have more problem in future if you don't pay time to read the mql guide,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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
Forum Jump

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


All times are GMT. The time now is 05:46 PM.



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