Tell prorealtime to wait for 5 candles

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #64466 quote
    Louwrens
    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
    robertogozzi
    Moderator
    Master

    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.

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 robertogozzi
8 years ago.

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