void OnStart()
{
//---
string up_arrow="up_arrow";
datetime time=TimeCurrent();
double lastClose[1];
int close=CopyClose(Symbol(),Period(),0,1,lastClose); // Kapanış (Close) fiyatını al
//--- Eğer fiyat alındıysa
if(close>0)
{
ObjectCreate(0,up_arrow,OBJ_ARROW,0,0,0,0,0); // Bir ok oluştur
ObjectSetInteger(0,up_arrow,OBJPROP_ARROWCODE,241); // Okun kodunu ayarla
ObjectSetInteger(0,up_arrow,OBJPROP_TIME,time); // Zamanı ayarla
ObjectSetDouble(0,up_arrow,OBJPROP_PRICE,lastClose[0]);// Fyatı ayarla
ChartRedraw(0); // Şimdi oku çiz
}
else
Print("Son kapanış (Close) fiyatları alınamadı!");
}
|