Easy Object – library MetaTrader 4

A simple class to simplify working with objects.

It was like this:

 ObjectCreate ( 0 , "name" , OBJ_TEXT , 0 , 0 , 0 );
 ObjectSetString ( 0 , "name" , OBJPROP_TEXT , "Hello, World!" );
 ObjectSetString ( 0 , "name" , OBJPROP_FONT , "Calibri" );
 ObjectSetInteger ( 0 , "name" , OBJPROP_FONTSIZE , 16 );
 ObjectSetInteger ( 0 , "name" , OBJPROP_COLOR , clrLimeGreen );
 ObjectSetInteger ( 0 , "name" , OBJPROP_ANCHOR , ANCHOR_LEFT_LOWER );
 ObjectSetInteger ( 0 , "name" , OBJPROP_TIME , TimeCurrent ());   // * 
 ObjectSetDouble ( 0 , "name" , OBJPROP_PRICE , Ask );             // * 
 // *For moving the object after creation

It became so:

_( "name" )               // ! name is required
 .type( OBJ_TEXT )        // ! type is required
 .text( "Hello, World!" )
 .font( "Calibri" )
 .fontSize( 16 )
 .colour( clrLimeGreen )
 .anchor( ANCHOR_LEFT_LOWER )
 .time( TimeCurrent ())
 .price( Ask );

The result:

  PinBar - indicator MetaTrader 4

Method names for the most part coincide with standard constants.

📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks