Home    |    Trading Alchemy Manual    |    Alchemy Functions Index

AlchemyPivotStop (Function)

AlchemyPivotStop is a multiple-output function that provides the real time swing high, swing low, trend and pivot stop of the Alchemy PivotStop indicator.

AlchemyPivotStop ( ActStart,EntrTime,EntrDate,PivStren,HTrap,LTrap,MinRetr,MinPen,InSwg,oHigh,oLow,oLongStop,oShortStop );

Parameters

 

ActStart

This input determines from what point the retracement pivots are calculated.  If you type "Day" into this user-defined input, the retracement pivots will start calculating with the beginning of each day.  This setting can only be used for Tick Bar and Intra-Day charts.  If you type "Entry" into this user-defined input, the retracement pivots will start calculating with the entry bar specified under the "EntrTime" and "EntrDate" input.  Please note that "EntrDate" needs to be filled in when setting this input to "Entry".  With a setting of  "FirstBar", the function will start calculating the retracement pivots with the first bar on the chart.

EntrTime

Allows you to set the time of the first bar from when the Alchemy PivotStop function will start calculation the pivot trailing stops.  The time format is in military time (e.g. 1:00pm=1300).  If applied on a Tick Bar or Intra-Day chart, a setting of 0 will disable the pivot trailing stop.  Please note that depending on the ActStart setting, the retracement pivot calculation may or may not begin with the entry time given.

EntrDate

Allows you to set the date of the first bar from when the Alchemy PivotStop function will start calculation the pivot trailing stops.  The date format is as follows:  Year-Month-Day (e.g. 010510 = May 5th, 2001).  If applied on a Daily, Weekly or Monthly chart, a setting of 0 will disable the pivot trailing stop.  If applied on a Tick Bar or Intra-Day chart, a setting of 0 will newly calculate the pivot trailing stop at the given entry time each day. Please note that depending on the ActStart setting, the retracement pivot calculation may or may not begin with the entry date given.

PivStren Specifies the minimum required number of retracement bars for a new swing to qualify.
HTrap/LTrap

The market sometimes makes a big move up or down without any retracements.  Then it will stay within this range for a longer period of time.  If this initial move is so large that you want to start pivot stop calculation within this range, you can enter the Swing High price into the “HTRAP” input and the Swing Low price into the “LTRAP” input.  This tells the function to ignore the large move and it will look for the next swing and start the pivot stop calculation from there.  The “HTRAP/LTRAP” simply subtracts the High from the Low to come up with the maximum allowed swing.  A setting of HTRAP 27 and LTRAP 0 results in a maximum allowed swing of 27 points.

MinRetr Specifies the minimum retracement point/dollar value of a retracement for a new swing to qualify.
MinPen Specifies the minimum point/dollar value by which the most recent pivot stop needs to be penetrated in order for a trend change to occur.
InSwg Specifies the minimum point/dollar range of each initial swing.
oHigh A numeric reference that receives the swing high price.
oLow A numeric reference that receives the swing low price.
oLongStop A numeric reference that receives the pivot long stop price. When the trend is down, this input returns a value of 0.
oShortStop A numeric reference that receives the pivot short stop price. When the trend is up, this input returns a value of 0.

 

Returns

AlchemyPivotStop returns a 1 if the current swing is up and it returns a -1 if the current swing is down.  The value for the swing high price is passed by reference back to the variable oHigh.  The value for the swing low price is passed by reference back to the variable oLow.  The value for the pivot long stop price is passed by reference back to the variable oLongStop.  The value for the pivot short stop price is passed by reference back to the variable oShortStop.

Home    |    Trading Alchemy Manual    |    Alchemy Functions Index