2 Attachment(s)
Adaptive C G Oscillator - Vertex FX Expert Advisor
The Adaptive CG Oscillator is a VertexFX client-side robot, which is derived from the Center of Gravity (CG) Oscillator. Unlike the CG Oscillator which requires an input PERIOD to calculate the CG, the Adaptive CG automatically detects the optimum period for calculating the CG. As the market changes, the period is automatically recalculated, and hence it is adaptive.
It comprises of two components, the CG indicator and the Trigger component.
To calculate the CG component we must first calculate the adaptive period. The adaptive period is calculated by computing the cycle period of the market cycle. We then calculate the CG, based upon the numerator and denominator component. The numerator is the sum of the product of the candle position and the price, and the denominator is the sum of the prices. Then the CG is just the negative ratio of the numerator to the denominator.
A zero counter value for Adaptive CG is established by adding half observation window (LENGTH) plus 1. Since the Adaptive CG is smoothed, an effective crossover signal is produced simply by delaying the Adaptive CG by one bar.
The Trigger is equivalent to the Adaptive CG oscillator component with a lag of 1 candle.
BUY - Enter BUY when CG component crosses above the Trigger component.
SELL - Enter SELL when CG component crosses below the Trigger component.
Inputs :
a) ALPHA - The smoothing constant used in the Adaptive CG Oscillator.
b) LOT_SIZE - The lot size of the trade.
c) TP_POINTS - The take profit in points.
d) SL_POINTS - The stop loss in points.
e) MAGIC - The unique identifier for trades generated by this robot.
f) POINT_DEFAULT - The point value of the current instrument.
Advanced Pro version of this EA is available in Vstore market.