Forex
Google

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


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 01-22-2006, 04:37 AM
ycomp's Avatar
ycomp ycomp is offline
Member
 
Join Date: Jan 2006
Posts: 93
ycomp is on a distinguished road
my first EA, simple question

Hi,

simple question, but it is stopping me from getting any further.

why doesn't the High value I output by runing this in the strategy tester match up with the one on the chart in the data window?

I am looking at the correct chart (I click the chart from the strategy tester)

the EA:

//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{

Print(iHigh(NULL,0,0));

return(0);
}
//+------------------------------------------------------------------+

I did this test because I couldn't match up the results of iCustom with the chart and was trying to dig backwards to see if I could even get the correct High price, which it seems I can't.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-22-2006, 06:54 AM
Kalenzo's Avatar
Kalenzo Kalenzo is offline
Senior Member
 
Join Date: Dec 2005
Location: Bydgoszcz - Poland
Posts: 692
Kalenzo is on a distinguished road
Quote:
Originally Posted by ycomp
Hi,

simple question, but it is stopping me from getting any further.

why doesn't the High value I output by runing this in the strategy tester match up with the one on the chart in the data window?

I am looking at the correct chart (I click the chart from the strategy tester)

the EA:

//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{

Print(iHigh(NULL,0,0));

return(0);
}
//+------------------------------------------------------------------+

I did this test because I couldn't match up the results of iCustom with the chart and was trying to dig backwards to see if I could even get the correct High price, which it seems I can't.
Try to do it that way
Print(High[0]);
But it's the same, i think your problem is that UR checking the highest value of non closed bar - it may change before close.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-22-2006, 08:23 AM
ycomp's Avatar
ycomp ycomp is offline
Member
 
Join Date: Jan 2006
Posts: 93
ycomp is on a distinguished road
ok, I'll try that... any ideas why the iCustom doesn't work? I tried with many indicators including simple ones like RSI, CCI. I was following the parameters properly, 0 for current bar, correct "line" variable, correct symbol and time frame, etc.

although the results were obviously the RSI, CCI value or whatever, they were not from the current bar.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-24-2006, 05:46 PM
ycomp's Avatar
ycomp ycomp is offline
Member
 
Join Date: Jan 2006
Posts: 93
ycomp is on a distinguished road
ok, stupid me... I tested it... that solves all my problems. High[0] returns the open of [0] because I guess that is all the data even in the strategy tester available.

High[1] returns the High of previous bar. Now that I understand it, makes perfect sense. thx.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SIMPLE-MACD-EA : An extremely simple EA based on 2 channels of MACD. Try it! investor_me Expert Advisors - Metatrader 4 29 07-14-2008 03:17 AM
Simple (i think) question RE iMA bwilhite Metatrader 4 3 09-08-2006 04:30 PM
Simple Question For Mql4 Programers: Changing The Di+ And Di- Periods Of Adx RJames5541 Metatrader Programming 9 07-31-2006 02:31 PM
A simple question from a newbye tradetrade Metatrader 4 1 07-18-2006 07:08 AM
Simple question of determining the time of day Fishtank Metatrader 4 2 04-04-2006 04:12 AM


All times are GMT. The time now is 09:00 AM.