Forex
Google

Go Back   Forex Trading > Discussion Areas > Metatrader 4
Forex Forum Register FAQ Members List Calendar Today's Posts


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
  #1 (permalink)  
Old 11-30-2005, 08:59 PM
steve_zhng steve_zhng is offline
Junior Member
 
Join Date: Nov 2005
Posts: 2
steve_zhng is on a distinguished road
Red face Is it possible?

Hi, everybody.

Is it possible to make up a indicator that can post on 30M Chart the MA curves based on 60M data?? (i.e. to post MA curve of higher time frame to lower time frame chart)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-30-2005, 10:14 PM
codersguru's Avatar
codersguru codersguru is offline
Senior Member
 
Join Date: Oct 2005
Posts: 987
codersguru has a spectacular aura aboutcodersguru has a spectacular aura aboutcodersguru has a spectacular aura about
Arrow Yes!

Quote:
Originally Posted by steve_zhng
Hi, everybody.

Is it possible to make up a indicator that can post on 30M Chart the MA curves based on 60M data?? (i.e. to post MA curve of higher time frame to lower time frame chart)
steve_zhng,

Sure, you can.

PHP Code:
int start()
  {
   
int    counted_bars=IndicatorCounted;
   
   
//---- check for possible errors
   
if (counted_bars<0) return(-1);
   
   
//---- last counted bar will be recounted
   
if (counted_bars>0counted_bars--;
   
   
int    pos=Bars-counted_bars;
   
   
//---- main calculation loop
   
while(pos>=0)
     {
       
ExtMapBuffer1[pos]= iMA(NULL,60,13,0,MODE_EMA,PRICE_CLOSE,pos);
         
pos--;
     }
   return(
0);
  } 
The second parameter in iMA function is the time frame you want to use. (here 60M).
__________________
Hope it helps !
Coders' Guru
Senior MQL programmer:
www.xpworx.com/custom.htm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-01-2005, 04:57 AM
steve_zhng steve_zhng is offline
Junior Member
 
Join Date: Nov 2005
Posts: 2
steve_zhng is on a distinguished road
Thanks a lot, Codersguru.

I really appreciate your reply and your wonderful course.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB 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



All times are GMT. The time now is 10:59 AM.