Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > 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 06-11-2007, 09:52 AM
Junior Member
 
Join Date: Jan 2007
Posts: 26
echnaton is on a distinguished road
indicator values from other timeperiod

Hello, how I can get indicator values from other time periods gotten during the strategy testers runs, with the Livechart that goes simply by just adjusts another period parameter, but with the strategy tester run does not function it. I hope someone know the problem and can help.
__________________
Excused my bad English
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-17-2007, 06:23 PM
RickD's Avatar
Member
 
Join Date: Jan 2006
Location: Eastern Europe
Posts: 54
RickD is on a distinguished road
Quote:
Originally Posted by echnaton
Hello, how I can get indicator values from other time periods gotten during the strategy testers runs, with the Livechart that goes simply by just adjusts another period parameter, but with the strategy tester run does not function it. I hope someone know the problem and can help.
Code:
double iCustom( string symbol, int timeframe, ...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-17-2007, 09:10 PM
Junior Member
 
Join Date: Jan 2007
Posts: 26
echnaton is on a distinguished road
hello and thank you very much for help, i have tried to get the indicator values from the stochastic indicator with this code :

Code:
iCustom(NULL,240,"Stochastic",0,1)
but it dont work, i just want to get the value from the 4 hour and daily stochastic Indikator during the strategy tester runs in the 15min chart?
__________________
Excused my bad English
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-17-2007, 09:43 PM
Senior Member
 
Join Date: Feb 2006
Posts: 524
Michel is on a distinguished road
Quote:
Originally Posted by echnaton
hello and thank you very much for help, i have tried to get the indicator values from the stochastic indicator with this code :

Code:
iCustom(NULL,240,"Stochastic",0,1)
but it dont work, i just want to get the value from the 4 hour and daily stochastic Indikator during the strategy tester runs in the 15min chart?
Stochastic is not a custom indic, you have tu use:
double iStochastic( string symbol, int timeframe, int %Kperiod, int %Dperiod, int slowing, int method, int price_field, int mode, int shift)
See MT4 dictionary.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 06-17-2007, 10:55 PM
Junior Member
 
Join Date: Jan 2007
Posts: 26
echnaton is on a distinguished road
hello, bcause of my bad english nobody undestands me perhabs. for first i also use the standard stochstic indicator and gave him other timeframe parameters at the time frame parameter there, this way i know thats nothing new. but this only works if you are in a live chart, then you get of this way valus from other timeframes, but if you try the same at a chart in the strategy tester runs it is not possible to get valus from other timeframes an that ist what i want. if the strategy tester runs you only get values from the current timeframe and is it not possible to get some right of other, so there is no simulation possible. i hope its understandable what i mean.
__________________
Excused my bad English
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 06-18-2007, 06:17 AM
Senior Member
 
Join Date: Feb 2006
Posts: 524
Michel is on a distinguished road
Quote:
Originally Posted by echnaton
hello, bcause of my bad english nobody undestands me perhabs. for first i also use the standard stochstic indicator and gave him other timeframe parameters at the time frame parameter there, this way i know thats nothing new. but this only works if you are in a live chart, then you get of this way valus from other timeframes, but if you try the same at a chart in the strategy tester runs it is not possible to get valus from other timeframes an that ist what i want. if the strategy tester runs you only get values from the current timeframe and is it not possible to get some right of other, so there is no simulation possible. i hope its understandable what i mean.
Yes, I understand you very well (maybe because my english is even worst than yours).
Here, almost nobody want to see this problem and that's why most of BT of strategy using higher timeframes are wrong.
I have no generic solution, but sometime I have one. You are luky the use of stochastic may be solved by my method.
Look at the attached DynamicRange indicator, and a simplified version for DailyRange. No one DailyRange indicator in this forum is right, but this well.
If you just use CopyRate() or get the value from the indic on higher tf, the tester will use the values of the closed bar. This means it knows the futur.
What you have do for the stochastic is the same as the DynamicRange code; in two words :
1) take the time of bar[i] in the working timeframe;
2) find the same bar in the M1 timeframe using iBarShift(); this is the EndBar
3) find the StartBar, which shift is EndBar + StocPeriod in minutes;
4) compute the range between StartBar and EndBar using iHighest() and iLowest() on M1;
5) Use iClose() of EndBar on M1 as your usual close;
6) now you can calculate your Stochastic: S = 100*(close - RangeLow)/Range;

Regards
Michel
Attached Files
File Type: mq4 DailyRange.mq4 (2.0 KB, 53 views)
File Type: mq4 DynamicRange.mq4 (2.3 KB, 56 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 06-18-2007, 11:44 AM
Junior Member
 
Join Date: Jan 2007
Posts: 26
echnaton is on a distinguished road
Hello, your post was very helpfull i think.
Now here is what i had find out.
If I put the DynamicRange Indicator on a Chart during the Strategy tester runs it doesnt draw his lines, if i put it on a livechart wihich has fineshd the previous bars it drwas his line.

If i put the DailyRange indicator on the strategy tester chart und let it run, it functioned, it drwas his line and look like it fit.

Now, this way you told me now i have had time ago in my head want to try. Now i now that it must be solve so, just by calculating the values of indicator self by taking every pricevalues from the chart with help of time[i] constant and so on.

i hope i can solve it and understands this problem for that i can test what i want in the strategy tester in future.

thank you very much for yours help at all.
__________________
Excused my bad English
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
[Request] EA to export indicator values to .txt or .csv files juanchoc Expert Advisors - Metatrader 4 4 01-15-2007 06:39 AM
Pip Values Maji General Discussion 10 01-06-2007 07:19 AM
Small Indicator values window Nightmasks Tools and utilities 3 08-16-2006 09:10 AM
Ema values The_N Expert Advisors - Metatrader 4 1 06-19-2006 04:22 PM


All times are GMT. The time now is 10:27 PM.



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