Files
mql5-skills/skills/mql5/references/docs/34-standardlibrary/2283-standardlibrary-chart-object-classes-obj-arrows-arrowclassesfixedcode-chartobjectarrowfixedcreate.md
T
2026-06-23 21:47:51 +08:00

73 lines
1.9 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Create
Creates "Arrow with fixed code" graphical object.
```
bool  Create(
   long      chart_id,     // chart ID
   string    name,         // object Name
   int       window,       // chart Window
   datetime  time,         // time
   double    price         // price
   )
```
Parameters
chart_id
[in]  Chart identifier (0 current chart).
name
[in]  Unique name of the object to create.
window
[in]  Chart window number (0 main window).
time
[in]  Time coordinate.
price
[in]  Price coordinate.
Return Value
true - successful, false - error.
Example:
```
//--- example for CChartObjectArrowCheck::Create     
//--- example for CChartObjectArrowDown::Create     
//--- example for CChartObjectArrowUp::Create     
//--- example for CChartObjectArrowStop::Create      
//--- example for CChartObjectArrowThumbDown::Create      
//--- example for CChartObjectArrowThumbUp::Create      
//--- example for CChartObjectArrowLeftPrice::Create     
//--- example for CChartObjectArrowRightPrice::Create      
#include <ChartObjects\ChartObjectsArrows.mqh>     
//---     
void OnStart()     
  {     
//--- for example, take CChartObjectArrowCheck     
   CChartObjectArrowCheck arrow;     
//--- set object parameters     
   double price=SymbolInfoDouble(Symbol(),SYMBOL_BID);     
   if(!arrow.Create(0,"ArrowCheck",0,TimeCurrent(),price))     
     {     
      //--- arrow create error     
      printf("Arrow create: Error %d!",GetLastError());     
      //---     
      return;     
     }        
//--- use arrow     
//--- . . .     
  }     
```