Forex
Google
New signals service!

Go Back   Forex Trading > Downloads > Indicators - Metatrader 4


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 08-05-2006, 07:03 PM
Junior Member
 
Join Date: May 2006
Posts: 25
wananohoshi is on a distinguished road
Multi timeframe through a shift calculation?

Hi everyone,

I am trying to get the readings of an H4 indicator through a H1 one. I appreciate the existence of MTF indicators, but think that there should be a more appropriate way to get the indicator readings at a different timeframe. I mean, something of the sort (this code does not do the work, unfortunately, as compared to the readings of a real #MTF indicator):

int shift4H = shift/4+1;
while(Time[shift]>Time[shift4H]) {
offset4H--;
}
double value = iCustom(Symbol(),PERIOD_H4,..., offset4H);

The benefits of the above code include fewer calculations and the possibility to use it with non-custom indicators (for example, the built-in Stochastic Oscillator/CCI/RSI, etc.). It would also make the creation of multi timeframe-aware indicators much easier and effortless, I guess.

But unfortunately I cannot get it to work...

Anyone tried to do what I am? Please share your experience!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 08-05-2006, 09:15 PM
Senior Member
 
Join Date: Feb 2006
Posts: 519
Michel is on a distinguished road
Try this :
PHP Code:
shiftH4 iBarShift(Symbol(), PERIOD_H4Time[shift], false);
value iCustom(Symbol(),PERIOD_H4,..., shiftH4); 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-06-2006, 10:02 AM
Junior Member
 
Join Date: May 2006
Posts: 25
wananohoshi is on a distinguished road
That's exactly what I was trying to do. Really precious piece of knowledge. Thank you so much for your help!

Take care.
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 Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi Timeframe Indicators keris2112 Indicators - Metatrader 4 2445 10-06-2008 06:00 AM
calculation question? antone Setup Questions 2 03-12-2007 01:19 AM
Timeframe / Shift divergence_trader Metatrader 4 2 02-12-2007 01:04 PM
Indicator calculation? cja Setup Questions 5 02-12-2007 09:51 AM
Multi EAs, multi brokers, same computer hhsmoney General Discussion 6 11-16-2006 08:32 PM


All times are GMT. The time now is 08:08 AM.



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