int = PlanetStationary(nDate, nSunSourceIndex, nPlanetID)
This macro function calculates the time, on nDate, when the planet specified by nPlanetID changes between direct and retrograde motion in geocentric ecliptic longitude.
•The allowed values for nPlanetID range from n_MERCURY to n_PLUTO.
•The sign of the result is negative if the planet is changing direction to be direct, and positive if the planet is changing direction to be retrograde, on nDate. If the date nDate does not correspond to either case, then the function returns 0.
•The absolute value of the result is the time of the day expressed in one millionth of a day (less than 1/10th of a second).
The macro code below checks whether any of the planets from Mercury to Pluto changes between direct and retrograde motion in geocentric ecliptic longitude on the date of the incoming macro token.
sResult = ''
for nPlanetID = n_MERCURY to n_PLUTO step 1
sBuffer = ''
nCurResIdx = PlanetStationary(n_TokenDate, 1, nPlanetID)
if nCurResIdx < 0
sBuffer = PlanetName(nPlanetID) + ' direct'
endif
if nCurResIdx > 0
sBuffer = PlanetName(nPlanetID) + ' retrograde'
endif
// add the time it occurs in parentheses
if nCurResIdx <> 0
sBuffer = sBuffer + FormatTime('" ("hh:nn")"', Abs(nCurResIdx), true)
endif
if sBuffer <> ''
if sResult <> ''
sResult = sResult + ', '
endif
sResult = sResult + sBuffer
endif
endfor
See also: planetary macro functions.
Topic 180015, last updated on 12-Oct-2026