MACD/ Stoch Crossover at the same time

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #93160 quote
    AndrewtAndrewt
    Participant
    New

    Hi Guys

    what wrong with the code below? all I am after is a MACD and Stoch crossover at the same time.

    indicator1 = SmoothedStochastic[14,3](close)
    c1 = (indicator1 CROSSES OVER 0)
    indicator2 = ExponentialAverage[9](MACDline[12,26,9](close))
    indicator3 = MACDline[12,26,9](close)
    c2 = (indicator2 CROSSES OVER indicator3)
    SCREENER[c1 AND c2] (null AS "null")

    Cheers

    Andrew

    #93168 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    To write code, please use the <> “insert PRT code” button, to make code easier to read.

    Thank you.

    It’s because STOCHASTIC cannot be < 0, so there will never be a CROSSOVER (line 2).

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

MACD/ Stoch Crossover at the same time


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
Andrewt @andrewt Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
7 years, 8 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 03/08/2019
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...