convert to trading view

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #237598 quote
    Larry SmithLarry Smith
    Participant
    New

    def H = highestAll( high );

    def ll=LowestAll(data = LOW);

    def avgC12 = expAverage(close,8);
    def avgC26 = expAverage(close, 12);
    def avgC10 = expAverage(close, 10);
    def avgC20 = expAverage(close, 20);
    def avgC50 = expAverage(close,30);

    def avgDiff12_26_1 = expAverage(avgC12[1] – avgC26[1], 120);
    def avgDiff12_26 = expAverage(avgC12 – avgC26, 120);

    def condition1 = (avgC12 – avgC26 > 0) or (avgDiff12_26_1 < avgDiff12_26);
    def condition2 = avgC12 – avgC26 > avgDiff12_26;
    def condition3 = (avgC10 > avgC20) or (avgC10 > avgC50);
    def condition4 = avgC20 > avgC50;
    #def condition5 = close>vwap;
    def finalCondition =if (condition1 and condition2) and (condition3 and condition4) then 1 else 0;
    #def finalCondition =if (condition1 and condition2) and (condition3 and condition4) and (condition5) then 1 else 0;

     

    addCloud( if( finalCondition ,h ,double.nan),ll , color.cyan , color.white);
    addCloud( if( finalCondition==0 ,h ,double.nan),ll , Color.white , color.cyan);

    #237599 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Please update your country flag. Thanks 🙂

    #237634 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Could you share screenshot of the indicator?

Viewing 3 posts - 1 through 3 (of 3 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

convert to trading view


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by Iván GonzálezIván González
2 years ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 09/15/2024
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...