Home About Contact
ForexForums.org




Reply
Old 10-23-2006, 02:45 PM   #1 (permalink)
Administrator
 
kokas's Avatar
 
Join Date: Sep 2006
Location: Portugal
Posts: 507
Pre-defined Variables

Pre-defined Variables
double Ask

Ask price (the Buyer's price).
if(iRSI(NULL,0,14,PRICE_CLOSE,0)<25)
{
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-StopLoss*Point,Ask+TakeProfit*Point,
"My order #2",3,D'2005.10.10 12:30',Red);
return;
}

int Bars

Number of bars on the chart.
int counter=1;
for(int i=1;i<=Bars;i++)
{
Print(Close[i-1]);
}

double Bid

Bid price (the Seller's price).
if(iRSI(NULL,0,14,PRICE_CLOSE,0)>75)
{
OrderSend("EURUSD",OP_SELL,Lots,Bid,3,Bid+StopLoss *Point,Bid-TakeProfit*Point,
"My order #2",3,D'2005.10.10 12:30',Red);
return(0);
}

double Close[]

Returns the closing price of the bar being referenced.
int handle, bars=Bars;
handle=FileOpen("file.csv",FILE_CSV|FILE_WRITE,';' );
if(handle>0)
{
// write table columns headers
FileWrite(handle, "Time;Open;High;Low;Close;Volume");
// write data
for(int i=0; i<bars; i++)
FileWrite(handle, Time[i], Open[i], High[i], Low[i], Close[i], Volume[i]);
FileClose(handle);
}

int Digits

Number of digits after decimal point for the current symbol.
Print(DoubleToStr(Close[i-1], Digits));

double High[]

Returns the highest price of the bar referenced.
int handle, bars=Bars;
handle=FileOpen("file.csv", FILE_CSV|FILE_WRITE, ';');
if(handle>0)
{
// write table columns headers
FileWrite(handle, "Time;Open;High;Low;Close;Volume");
// write data
for(int i=0; i<bars; i++)
FileWrite(handle, Time[i], Open[i], High[i], Low[i], Close[i], Volume[i]);
FileClose(handle);
}

double Low[]

Returns the lowest price of the bar referenced.
int handle, bars=Bars;
handle=FileOpen("file.csv", FILE_CSV|FILE_WRITE, ";");
if(handle>0)
{
// write table columns headers
FileWrite(handle, "Time;Open;High;Low;Close;Volume");
// write data
for(int i=0; i<bars; i++)
FileWrite(handle, Time[i], Open[i], High[i], Low[i], Close[i], Volume[i]);
FileClose(handle);
}

double Open[]

Returns the opening price of the bar referenced.
int handle, bars=Bars;
handle=FileOpen("file.csv", FILE_CSV|FILE_WRITE, ';');
if(handle>0)
{
// write table columns headers
FileWrite(handle, "Time;Open;High;Low;Close;Volume");
// write data
for(int i=0; i<bars; i++)
FileWrite(handle, Time[i], Open[i], High[i], Low[i], Close[i], Volume[i]);
FileClose(handle);
}

double Point

Point value for the current chart.
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+TakePro fit*Point,Red);

datetime Time[]

Open time of the bars. Datetime is the number of seconds elapsed from 00:00 January 1, 1970.
int handle, bars=Bars;
handle=FileOpen("file.csv", FILE_CSV|FILE_WRITE, ';');
if(handle>0)
{
// write table columns headers
FileWrite(handle, "Time;Open;High;Low;Close;Volume");
// write data
for(int i=0; i<bars; i++)
FileWrite(handle, Time[i], Open[i], High[i], Low[i], Close[i], Volume[i]);
FileClose(handle);
}

double Volume[]

Returns the ticks count for the referenced bar.
int handle, bars=Bars;
handle=FileOpen("file.csv", FILE_CSV|FILE_WRITE, ';');
if(handle>0)
{
// write table columns headers
FileWrite(handle, "Time;Open;High;Low;Close;Volume");
// erite data
for(int i=0; i<bars; i++)
FileWrite(handle, Time[i], Open[i], High[i], Low[i], Close[i], Volume[i]);
FileClose(handle);
}

Attached Files
File Type: doc Pre-defined Variables.doc (60.5 KB, 5 views)
kokas is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply

Bookmarks



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On


Sedo - Buy and Sell Domain Names and Websites project info: forexforums.org Statistics for project forexforums.org etracker® web controlling instead of log file analysis

All times are GMT. The time now is 06:21 PM.
Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.