//--- CChartObjectArrow::ArrowCode 의 예
#include <ChartObjects\ChartObjectsArrows.mqh>
//---
void OnStart()
{
CChartObjectArrow arrow;
char code=181;
//--- 객체 매개 변수 설정
double price=SymbolInfoDouble(Symbol(),SYMBOL_BID);
if(!arrow.Create(0,"Arrow",0,TimeCurrent(),price,code))
{
//--- 화살표 생성 오류
printf("화살표 생성: 오류 %d!",GetLastError());
//---
return;
}
//--- 화살표 코드 변경
//--- . . .
//--- 화살표 코드 가져오기
if(arrow.ArrowCode()!=code)
{
//--- 화살표 코드 설정
arrow.ArrowCode(code);
}
//--- 화살표 사용
//--- . . .
}
|