int Value1 = 100 * ( XAverage( XAverage( Close - (.5 * ( Highest( High, Length ) + Lowest( Low, Length ) ) ), Smooth1), Smooth2) / (.5 * XAverage( XAverage( Highest( High, Length )- Lowest( Low, Length ), Smooth1 ), Smooth2 ) ) ) ;
I have got this far but it does look like what it shoudl: please help! its my first indicator in ninja thanks
protected override void OnBarUpdate() { // Use this method for calculating your indicator values. Assign a value to each // plot below by replacing 'Close[0]' with your own formula. int highestBar = HighestBar( High, Length ); int lowestBar = LowestBar( Low, Length ) ; DataSeries myDataSeries = new DataSeries(this); myDataSeries.Set(highestBar - lowestBar); double internalEMAChild = EMA(myDataSeries,Smooth1)[0]; DataSeries myDataSeries2 = new DataSeries(this); myDataSeries2.Set(internalEMAChild); double internalEMAParent = .5 *( EMA(myDataSeries2,Smooth2)[0]); DataSeries myDataSeries3 = new DataSeries(this); double tempLowestHighest = Close[0] - ( .5 * (highestBar + lowestBar)); myDataSeries3.Set(tempLowestHighest); double externalEMAChild = EMA( myDataSeries3,Smooth1)[0]; DataSeries myDataSeries4 = new DataSeries(this); myDataSeries4.Set(externalEMAChild); double externalEMAParent = EMA(myDataSeries4,Smooth2)[0]; Plot0.Set(100 * (externalEMAParent /internalEMAParent )); }
Comment