Optimal Buy/Sell/Hold

Abbreviation: OptimalBuySellHold
Category: Neural Outputs
Input Parameters:

Name Range Default
Time Series Close
Lookback Periods Int >= 0 10

 
Calculation:

Computes a buy (1), sell(-1) or hold (0) signal for n bars ago. A buy signal is generated if the value n bars ago is approaching a peak and a sell signal is generated if the value n bars ago is approaching a valley. A hold is generated on bars prior to a peak when the change to the peak is less than the change to the next valley. Likewise a hold is generated on bars prior to a valley when the change to the valley is less than the change to the next peak. A peak is the highest value over the last n bars, while a valley is the lowest point over the last n bars.

Where

n = Lookback Periods 

 
Discussion:

Since this indicator computes a buy/sell/hold signal from a past value to a past peak or valley, it is best used as an output for a prediction.
 

Was this article helpful?

Related Articles