This is in a custom indicator: It prints the correct value the first time, then the value 0 afterwards.
I have the logic all working if it is all in a stragey but I need logic with Pivot values in a seperate file. How would you reccomend I do this?
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
Print("OnBarUpdate Indicator");
printOneZone();
}
///<summary>
/// Print only the pivot PP Daily
///</summary>
publicvoid printOneZone(){
double value = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 0, 0, 0, 20).PP[0];
Print ("printOneZone PP Daily Pivot value is:" + value.ToString());
}
Comment