Announcement

Collapse
No announcement yet.

Changes to action when reload & a Question on values

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

  • Changes to action when reload & a Question on values

    I developed this pattern to detect "Dark-Cloud Cover"
    I used open() and Close() to refer to current candle I used –(number) to refer to previous candle.
    These patterns need no confirmation from next candle. So I do not need candle (1) being future candle.

    First: It works fine and the text (Action) appears but when I reload the function Text (Action) disappear.

    Line 70 : drawTextRelative(0, high(0), " Bear Dark-Cloud Cover", Color.RGB(255,255,0), Color.RGB(128,0,128), Text.FRAME, "Arial", 12);
    Line 71: vLastAlert = 1;


    Second: Question on how to change line 42
    close() < close(-1) &&

    Please help me change it to be
    Current candle close is under 50% of the difference between the previous candle open and close.

    If previous candle open and close is 15 and 16 (this candle is an up trend candle) the current candle close should be less than 15.50 to get the pattern right.

    Thank you for your great help
    Tom

    Attached Files
    Tom Shadi

  • #2
    Tom
    Not sure what you mean with "but when I reload the function Text (Action) disappear". I tried reloading the efs multiple times but the text remains on the chart (see image below)
    As to your second question you would use
    close() < (open(-1)+close(-1))/2 &&
    Alex

    Comment

    Working...
    X