Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 4 Libraries | Easy Object

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:

MetaTrader Experts, Indicators, Scripts and Libraries

Method names for the most part coincide with standard constants.

23261