Tell prorealtime to wait for 5 candles

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #64466 quote
    LouwrensLouwrens
    Participant
    Junior

    Hi

    How do tell prorealtime to wait for 5 candles and then check the conditions? I have a condition that needs to be met and then the price must stay above a MA for the next 5 candles. If I use the code below, it will look at 5 candles back from where the flag condition was met.

    c2 =  close[5] > indicator3 and close[4] > indicator3 and close[3] > indicator3 and close[2] > indicator3 and close[1] > indicator3
    #64497 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    You code sounds correct. The same result can be achieved with

    c2 = (summation[5](close[1] > indicator3) = 5)
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

Tell prorealtime to wait for 5 candles


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Louwrens @louwrens Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/05/2018
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...