Announcement

Collapse
No announcement yet.

Forecast Oscillator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Forecast Oscillator

    I'm a new user of eSignal.
    Could you translate this formula from MetastocK To eSignal language and tell me where i have to insert it???

    Enter Long:
    Cross(opt1,ForecastOsc(CLOSE,opt3))

    Close Long:
    Cross(ForecastOsc(CLOSE,opt3),opt2)

    Enter Short:
    Cross(ForecastOsc(CLOSE,opt3),opt2)

    Close Short:
    Cross(opt1,ForecastOsc(CLOSE,opt3))

    "opt3" represents the number of days inserted into the
    forecast oscillator. I usually use three (3) to ten (10) for the forecast oscillator

    Opt1 is the numeric value below a zero basis line that will trigger a long
    position and close out the short

    Opt2 is the numeric value above a zero basis line that will trigger a short sale

    Thank You

  • #2
    I am not familiar with the metastock code, but it is more difficult than it seems. Please take a look at the Fileshare area and perform a text search on Forecast Oscillator and see if any of the code there is similar. That will give you a base to build upon (there will be 4 pages)

    Comment


    • #3
      forcast oscillator

      hi,

      the formula looks like this:

      indicator Forecast_Oscillator;
      input price = close, period = 5, signal_period = 3;
      draw line("FO"), line_signal("FO sig");
      vars tsf(series), i(number);
      begin
      tsf := linreg(price, period) + linregslope(price, period);
      for i := front(tsf) + 1 to back(tsf) do
      line[i] := 100 * (price[i] - tsf[i - 1]) / price[i];
      line_signal := ema(line, signal_period);
      end.

      i haven't tried to convert to javascript, but if somebody wants then we all can drop it in the fileshare area.

      /th

      Comment

      Working...
      X