Fibonacci Lucas Time Series Indicator

The Fibonacci Lucas Time Series Indicator was authored by Andrew Coles in the Stocks And Commodities Magazine in August 2012. In addition, a Moving Average is provided to aid the user in selecting an entry point. This indicator displays possible exit points based on Fibonacci and Lucas numbers calculated as the number of bars from the chosen entry point. The user may change the entry point date and time (year, month, day, hour, minute), the input (close), method for Moving Average (EMA) and period length. This indicator’s definition is further expressed in the condensed code given in the calculation below.

FibonacciLucas1

How To Trade Using the Fibonacci Lucas Time Series Indicator

Chose an appropriate entry point; a Moving Average is provided to aid in this choice. Possible exit points are calculated and displayed based on Fibonacci and Lucas numbers since the entry date.

FibonacciLucas2

How To Access in MotiveWave

Go to the top menu, choose Study>Custom>Fibonacci Lucas Time Series Indicator

or go to the top menu, choose Add Study, start typing in this study name until you see it appear in the list, click on the study name, click OK.

Important Disclaimer: The information provided on this page is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security. Please see our Risk Disclosure and Performance Disclaimer Statement.

Calculation

//Year = entry time, user defined, default is 2012
//Month = entry time, user defined, default is 9
//Day = entry time day of month, user defined, default is 10
//Hour = entry time (0-24), user defined, default is 10
//Minute = entry time, user defined, default is 0
//input = price, user defined, default is close
//method = moving average, user defined, default is EMA
//period = user defined, default is 21
//index = current bar number

Plot: ma = ma(method, index, period, input);
//Get date and time of current bar
GregorianCalendar cal = new GregorianCalendar();
curBarTime =  getStartTime(index);      
cal.setTimeInMillis(curBarTime);
cYr = cal.get(GregorianCalendar.YEAR);
cMth = cal.get(GregorianCalendar.MONTH);
cDay = cal.get(GregorianCalendar.DAY_OF_MONTH);
cHr = cal.get(GregorianCalendar.HOUR_OF_DAY);
cMin = cal.get(GregorianCalendar.MINUTE);
//Compare date and time of current bar to values entered
if (cYr==yr AND cMth==mth AND cDay==day AND cHr==hr AND cMin==min) 
      dateTime = String.valueOf(yr)+ " " + String.valueOf(mth)+ " " +
         String.valueOf(day)+ " " + String.valueOf(hr)+ " " + String.valueOf(min);
      startIndex = index;
      sigMess = get("ENTER_PRICE_TIME");
      dispMess = get("ENTER") + ":" + dateTime;
      enter = true;
endIf
if (startIndex lessThan 0 ) return;

if (neutralOn) setPriceBarColor(index, neutralC);
exitNo = index - startIndex;
if (isFibonacci(exitNo)) 
        setPriceBarColor(index, fibC);
        sigMess = get("EXIT_PRICE_FIBONACCI");
        dispMess = get("EXIT_FIB") + String.valueOf(exitNo);
        exit = true;
endIf
if (isLucas(exitNo)) 
        setPriceBarColor(index, lucC);
        sigMess = get("EXIT_PRICE_LUCAS");
        dispMess = get("EXIT_LUC") + String.valueOf(exitNo);
        exit = true;
endIf