Estimated reading time: 9 min

PrescienTrader provides extensive configuration options in the AmiBroker Parameters window. These parameters allow you to tune the algorithm for different markets, time frames, different types of data inputs, etc…

To open the Parameters window, right-click on a PrescienTrader chart and select Parameters from the context menu.


API Key

The API Key is like a combination of a username and password that uniquely identifies and authenticates you in our system. You can obtain an API key in your PrescienTrading account. If you don’t yet have a PrescienTrading account, you can sign up for free. See the article, Creating a PrescienTrader Chart Pane, for more information on acquiring and entering your API key.

The API Key parameter only appears in the Parameters window for charts, not the analysis Parameters window. However, once you set your API key, it’s permanently saved and will be used automatically, whenever you create a new chart or analysis.

Log File Path

This setting only appears in the Parameters window when running an analysis (Exploration, Backtest, Optimization, etc… It does NOT appear in the chart Parameters window. If you enter a file path, PrescienTrader will log all status updates to the specified file, in addition to outputting to the log window. The log window only retains a few thousand lines, while the log file has no size limit. Thus, it’s useful when running long optimizations, that may run for many hours or even days. It creates a full log of everything that happened, in case you get any errors due to lost Internet connection or other technical issues.

When entering the file path, enter the full path to the log file you want to create. For example:

C:\Users\John Doe\PrescienTrader.log

You may also use the {PID} placeholder in the file path. This will be replaced with the process ID of the running AmiBroker instance. The process ID is an arbitrary number assigned by the system to a running application. Since each AmiBroker instance has a unique process ID, this allows you to create a separate log file for each AmiBroker instance, when running multiple instances simultaneously. For example:

C:\Users\John Doe\PrescienTrader-{PID}.log

Once you set the Log File Path, it’s permanently saved and will automatically be filled in, whenever you create a new analysis. If you don’t want to create log files, leave this setting blank.

Data Series

The Data Series parameter allows you to select which data series to analyze. The built-in options include Open, High, Low, Close, Average, Volume and Open Interest. The default setting is Close and unless you have a really good reason for wanting to analyze a different series, we recommend using Average or Close.

Additionally, if you add any custom indicators to the chart pane, you can select a custom indicator as the data series to analyze. The article, Analyzing a Custom Data Series, explains this in more detail.

Polarity

Polarity can either be Positive or Negative. The default setting is Positive. Negative Polarity will invert the Prescient Line plot. For reasons we cannot explain, inverting the Prescient Line may yield superior results in certain markets. Nevertheless, this is the exception, so unless you’ve verified this scenario by extensively backtesting a market using negative Polarity, you should leave Polarity set to Positive.

You can override the Polarity setting in the Parameters window by setting the ptPolarity AFL variable to either 0 or 1.

  • 0 = Positive
  • 1 = Negative

When running a backtest or optimization, you may set the AFL variable to an array, to dynamically vary the value on each bar.

PL Basis

PL Basis refers to the weighting algorithm used to calculate the Prescient Line. It can be set to Amplitude, Strength, Frequency or Frequency Inverted. The default setting is Strength.

The Prescient Line is generated by combining all the valid cycle peaks into a single composite graph. The traditional approach to combining cycle peaks is to add their amplitudes. While this approach is perfectly valid, the longer frequencies usually have much greater amplitudes than the shorter frequencies. This can result in so much weight being assigned to the longer frequencies that the graph becomes useless for short-term trading.

The Max Frequency setting, discussed below, allows you to filter frequencies above a certain threshold, so you can focus on the short-term frequencies, which are more applicable to short-term trading. This approach is effective, but somewhat crude, because it completely discounts the effect of the long-term cycles, which do have an effect, even in short-term trading. It also requires you to select an arbitrary cutoff, which may or may not be optimal in a particular trading scenario.

A more sophisticated way to eliminate the long-term bias is to weight the cycles by Strength rather than Amplitude. Cycle strength is defined as amplitude divided by frequency. For example, a cycle with a frequency of 10 and an amplitude of 50 would have a strength of 5. Another cycle with a frequency of 100 and an amplitude of 250 would have a strength of 2.5. Thus, if you were weighting the cycles by amplitude, the long-term cycle would have five times more weight than the short-term cycle. However, if we weight by strength, the short-term cycle would have twice the weight of the long-term cycle.

You can override the PL Basis setting in the Parameters window by setting the ptPLBasis AFL variable:

  • 0 = Amplitude
  • 1 = Strength

When running a backtest or optimization, you may set the AFL variable to an array, to dynamically vary the value on each bar.

Lookback Range

Lookback Range is a multiplier of the longest cycle frequency. It specifies how much of the data series will be used for the cycles analysis. This can vary between 1 to 10, with a default value of 3. For example, suppose your data series contains 3,000 bars, your Max Frequency is set to 300 and you specify a Lookback Range of 5. 300 X 5 = 1,500 bars, so out of the 3,000 bars, only the most recent 1,500 bars would be analyzed. Specifying a lower Lookback Range forces PrescienTrader to ignore older data, which may not be as relevant as more recent data. However, it’s a trade-off because using a smaller sample size increases the possibility that recent price anomalies could introduce statistical error and distort the analysis. PrescienTrader’s algorithms compensate for this to an extent, but the algorithms can only work with the data they’re given.

You can override the Lookback Range setting in the Parameters window by setting the ptLookbackRange AFL variable. When running a backtest or optimization, you may set the AFL variable to an array, to dynamically vary the value on each bar.

Min Frequency

Min Frequency is the minimum (fastest) frequency PrescienTrader will consider when performing a cycles analysis. The default setting is 10 bars and this should be fine for most markets. However, if you’re analyzing a noisy market or you’re only interested in taking longer-term trades, you can increase the Min Frequency to remove some of the noise from the price data.

You can override the Min Frequency setting in the Parameters window by setting the ptMinFrequency AFL variable. When running a backtest or optimization, you may set the AFL variable to an array, to dynamically vary the value on each bar.

Max Frequency

Max Frequency is the maximum (slowest) frequency PrescienTrader will consider when performing a cycles analysis. The default and maximum allowable setting is 300 bars. For short-term trading, it may be beneficial to reduce Max Frequency, as the default setting of 300 may sometimes introduce a long-term bias to the Prescient Line. If you want to analyze cycles greater than 300 bars, you can switch to a higher time period. For example, analyzing a 300-bar cycle on a weekly time frame would be equivalent to analyzing a daily 2,100 bar cycle.

You can override the Max Frequency setting in the Parameters window by setting the ptMaxFrequency AFL variable. When running a backtest or optimization, you may set the AFL variable to an array, to dynamically vary the value on each bar.

Harmonic Filter

J.M. Hurst’s Principle of Harmonicity asserts that valid cycle peak frequencies should progress geometrically, with each peak frequency being about twice the length of the previous peak frequency. For instance, a 10-bar peak frequency should be followed by a 20-bar peak frequency, then a 40-bar peak frequency, etc… The Harmonic Filter filters out cycle peaks that are too close to one another, by favoring the peak with the higher amplitude. The Principle of Harmonicity is not exact, it’s more a rule of thumb, so you can adjust the filter on a scale of 0 – 100 with a default of 50. A setting of 0 would result in no filtering. A setting of 100 would enforce a strict geometric progression, such that each cycle peak frequency would need to be at least twice the length of the prior peak frequency. A setting of 50 would mean that each peak frequency needs to be at least 1.5 times the length of the prior peak frequency.

You can override the Harmonic Filter setting in the Parameters window by setting the ptHarmonicFilter AFL variable. When running a backtest or optimization, you may set the AFL variable to an array, to dynamically vary the value on each bar.

Min Fitness

Min Fitness allows you to filter out cycles that fail to meet the specified statistical threshold and are likely just noise. The default value is 50. When Min Fitness is set to a value greater than 0, PrescienTrader performs a sophisticated statistical test on each cycle frequency and returns a fitness score ranging from 0 – 100. Cycle peaks must meet or exceed the Min Fitness to be included when calculating the Prescient Line.

You can override the Min Fitness setting in the Parameters window by setting the ptMinFitness AFL variable. When running a backtest or optimization, you may set the AFL variable to an array, to dynamically vary the value on each bar.

Best X Cycles

Best X Cycles allows you to specify the maximum number of cycle peaks that will be used to generate the Prescient Line. The default value is 10. Cycle peaks will be prioritized by Fitness. If PrescienTrader finds more peaks than the number specified by Best X Cycles, it will filter out the lowest fitness peaks.

You can override the Best X Cycles setting in the Parameters window by setting the ptBestXCycles AFL variable. When running a backtest or optimization, you may set the AFL variable to an array, to dynamically vary the value on each bar.

Cycles Sorting

PrescienTrader generates detailed cycles reports in the AmiBroker Interpretation window. The Cycles Sorting parameter determines how the cycles are sorted in the reports. The default setting is to sort them by Frequency. Alternatively, you can sort them by Amplitude, which will display the cycles with the greatest amplitude first, or Strength, which will display the strongest cycles first. Strength is calculated by dividing the amplitude by the frequency. For example, a cycle with an amplitude of 200 and a frequency of 50 would have a strength of 200 / 50 = 4.

You can override the Cycles Sorting setting in the Parameters window by setting the ptCyclesSorting AFL variable.

Save / Clear Chart Settings

PrescienTrader provides many parameters that allow you to tune the algorithm for different markets and different time frames. When you start analyzing lots of different markets, it can quickly become complicated to keep track of which parameter settings apply to which charts, not to mention time-consuming to have to adjust the parameters each time you switch charts.

To address these issues, PrescienTrader provides the ability to save the parameters for any chart, by simply opening the Parameters window and clicking the Save Chart Settings button. This will save the parameter settings for that chart only. Each combination of ticker symbol and time frame has its own unique set of parameters. So you could save parameter settings for an AAPL daily chart, then switch to an AAPL weekly chart and save a completely different set of parameters. Each time you switch between the daily and weekly charts, the parameters will update automatically.

Only parameters that affect the analysis of the data series will be saved. Parameters affecting the appearance of the chart will not be saved. This is because these parameters are applicable to all charts, rather than a specific chart. For example, it would make no sense to change the color of the Prescient Line plot for just one chart. It would be confusing if the plot color changed each time you switched to a different chart.

Specifically, the following parameters will NOT be saved:

  • Data Series
  • Color
  • Cycles Sorting

Saved parameter settings will override the settings displayed in the Parameters widow, so if you change a setting on a chart that has saved settings, your changed setting will have no effect and the chart will continue to use the saved setting. To remove the saved settings click the Clear button. After you clear the saved settings, PrescienTrader will revert back to using the settings displayed in the Parameters window. You can also click the Reset All button to force the Parameters window to display the saved chart settings.

Save Default Settings

In addition to saving settings for individual charts, you can also save default settings that can be applied to new charts. Unlike saved chart settings, the default settings do NOT override the displayed settings. Click the Reset All button to revert to the default settings in the Parameters window. Note that if a chart has saved settings, Reset All will revert to the saved settings, not the default settings. If you want the default settings, first click the Clear button to clear the saved settings, then click the Reset All button.

The API Key and Log File Path are saved automatically, even if you don’t click the Save Default Settings button.

HTP1 / HTP2

HTP is an abbreviation for Higher Time Period. PrescienTrader allows you to overlay up to two higher time period Prescient Lines in a single chart pane. You can even overlay the same time period using different parameter settings. For example, if your base time period is daily, you could use HTP1 and HTP2 to plot additional daily charts with different parameter settings.

  • The Period parameter, found in the HTP parameter sections, sets the time periods for the HTP1 and HTP2 overlays. The available periods are:
    • Auto
    • Tick
    • Second
    • Minute
    • Hour
    • Day
    • Week
    • Month
    • Year
  • The Period Freq parameter specifies the frequency of the selected period. For example, if you set the Period to Week and the Period Freq to 4, that would create a 4-week Prescient Line overlay.

If you set the Period parameter to Auto, PrescienTrader will select the higher time periods automatically, relative to the base time period. For example, if your base time period is Daily, it will use Weekly for HTP1 and monthly for HTP2.

The parameter settings in the HTP1 and HTP2 sections operate the same way as the corresponding settings in the main section. The only difference is, these settings are specific to the HTP1 and HTP2 analyses. You can independently adjust Min Frequency, Max Frequency, Lookback Range, Harmonic Filter, Min Fitness, Best X Cycles and PL Basis for each of the three time periods.

Was this article helpful?
Dislike 0
Views: 519
FOREVER FREE
Daily Trading Signals
by PrescientSignals
SUBSCRIBE
Subscribe to receive FREE trading signals delivered to your email inbox daily
Free signals are delayed by one-week. This allows you to evaluate our PrescientSignals service risk-free, by comparing the previous week's predictions with the actual results.
FOREVER FREE
Daily Trading Signals by PrescientSignals
SUBSCRIBE
Subscribe to receive FREE trading signals delivered to your email inbox daily
Free signals are delayed by one-week. This allows you to evaluate our PrescientSignals service risk-free, by comparing the previous week's predictions with the actual results.