View Single Post
  #6 (permalink)  
Old 12-16-2008, 03:31 AM
rwb181 rwb181 is offline
Junior Member
 
Join Date: Dec 2008
Posts: 12
rwb181 is on a distinguished road
Shorter yet

I have learned that this will work as well;

if(iOpen(NULL,0,1)<iOpen(NULL,0,2) && iOpen(NULL,0,2)>=iClose(NULL,0,2)) siCurrentDirection = 1; //up
if(iOpen(NULL,0,1)>iOpen(NULL,0,2) && iOpen(NULL,0,2)<=iClose(NULL,0,2)) siCurrentDirection = 2; //down

A little shorter than the first I made.

I believe I can use the "TimeFrame" standard constant inside these to get
data from other time frames. But, this will work for now.

Have a great day Everyone!!
Reply With Quote