Setting 10-20: Applicable for Object based Indicators

Note: Before customizing these settings, you need to have selected the object based indicator type under Setting 5. 

A chart can have many objects on it. But the EA needs to distinguish the buy and sell signal objects from other objects to avoid conflicts. This is done through

  • an object name prefix + respective buy & sell colors or
  • distinguishable text for buy and sell objects

Using a common object name prefix with different object colors for buy and sell

Setting 10: Object Name Prefix: In this method, the indicator objects need to have a predefined prefix for identification. This prefix can be one or a few initial characters which are present in every buy/sell object that the indicator makes.

Example: The below is from an indicator that creates blue and red triangles as sell and buy signals respectively. If you look at the objects created by this indicator as given below, you will notice that all the objects have the prefix “PZHT12”, so this part can be used under Setting 9. The idea here is to distinguish the buy and sell objects from other objects so that the EA can use them for trading.

Now we have identified the buy and sell signal objects with a common prefix. The next step is to distinguish between buy and sell which is done by the respective object colors.

Setting 11: Object Color for Buy Objects: You need to select the right color of the buy signal object. No other indicator must be generating objects with this color with the same name prefix to avoid confusion. You may change the colors to have unique colors for the selected buy signal if your indicator has customizable colors.

You can find the objects colors by: right click on an MT4 chart area, click on “Objects List”, and select the required Object. The color can be found in the “Style” setting under the “Common” tab of the object properties.

Setting 12: Object Color for Sell Objects: This is the opposite of the previous setting. Set the correct color of the sell signal object.

Example: given below are the objects from a Harmonic pattern indicator, which creates triangle objects on the chart on the finding of harmonic patterns. You need to select the “LightSkyBlue” color under the buy signal with this object.

Using a common object name prefix with different object colors for buy and sell

In this method, your objects need to have distinguishable text/number for buy and sell signals. This can be a prefix, suffix or text/number in the middle.

Example 1: An indicator creates objects whose name can be xxxxB123xxx for buy objects and xxxxxS123xxx for sell signals. Here you notice that B123 and S123 can be used to distinguish buy and sell objects.

Example 2: An indicator creates objects whose name can be xxxxx0-01 for buy objects and xxxxx0-02 for sell signals. Here you notice that 0-01 and 0-02 can be used to distinguish buy and sell objects.

Example 3: An indicator creates objects whose name can be trend1xxxxx for buy objects and trend2xxxxx for sell signals. Here you notice that trend1 and trend2 can be used to distinguish buy and sell objects.

Setting 13: Object Name Includes for Buy: This is where you add the buy signal common text as discussed above.

Setting 14: Object Name Includes for Sell: This is where you add the sell signal common text as discussed above.

Once we identify the objects for buy and sell signals we can further use time filters to identify the most recent and tradeable objects.

Setting 15: Filter by Time: When you first load the EA on to the chart, the chart may load objects created based on the past candles. However, EA needs to ignore the past indicator objects and not open trades on past objects. You can set a period so that only the objects created within a specified period to the past from the current time can be used to make trades. This time will be with reference to the time of the object. However, an object can have up to 3-time points.

For instance, a triangle would have 03-time points and a rectangle would have 02-time points while an arrow would have only one time point. You need to decide which time point that you are going to use to filter the objects by time. Generally, if there are more than one time points for your object, then you need to use the latest time point.

You can find the objects by right-clicking on the MT4 chart area, click on “Objects List”, and select the required Object. The time points can be found under the “Parameters” tab of the object properties.

Example: Time points in a triangle object.

You should have only one time point as “true” out of the three and the other two should be “false”. The one you set as true will be the reference time for filtering past objects.

Setting 16: Explained above

Setting 17: Explained above

Setting 18: Object Newer than (Minutes): This is the time filter discussed before. The time is in minutes. For instance, if you use “5” here, that means objects created within the last 5 minutes with reference to the object time will be considered by the EA for entering into trades. Generally, it is recommended to use twice the time of your timeframe. For instance, if you are using the EA on a 5-minute chart, then it is better to have 10 minutes here. However if your objects are created later than that, you may have to increase this time.

Setting 19: Object Older Than (Minutes): This is the opposite of the previous setting. Sometimes, objects can be repainting and you may want to wait for little time before trade entry to see if the object disappears. For instance, if you put 10 minutes here, EA will wait 10 minutes after recognizing the object. If you want to enter the trade just as it is recognized, then leave this as “0”.

NB: “Object Older Than” time should always be less than the “Object Newer Than” time. For instance if you add 30 minutes for Setting 17, then you can have 29 minutes or less for this setting.

Setting 20: Same object updated: Some indicators do not generate new objects every time a signal is given. Instead, they only update the existing object. In this case, if you look at the objects, you will see that there are only two objects for buy and sell which are updated as and when new signals are generated. In such a case, you need to set this setting as “true”.

Setting 10-20: Applicable for Object based Indicators