Two rules to be met but with x bars between

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #90565 quote
    PastaPestoPastaPesto
    Participant
    Veteran

    Hello!

    I am in need of help for the following. I have two rules that has to be met before a trade. Lets say first a crossover of EMA and then an engulfing candle. The only problem is that I can only code this to happen at the exact same time for an order to be triggered. In the exampel above I want that my first rule (EMA crossover) to be met and then  there should be a time space (lets say within 10 candles) where next trigger can be formed (engulfing candle in this example).

    How do I code a triggered rule to be valid for a x time forward?

    #90566 quote
    VonasiVonasi
    Moderator
    Master

    This might help:

    2 conditions for order, how many bar between the 2?

    There are lots of interesting code snippets to be found here with links to relevant threads. This one is in there.

    https://docs.google.com/spreadsheets/d/1rgboqj7sVwsP9ZRhOduOefye48QMWC07jWVXCl-KJPU/edit#gid=0

    PastaPesto thanked this post
    #90613 quote
    PastaPestoPastaPesto
    Participant
    Veteran

    Perfect!

    I found it, its working and its simple!

    Thanks!

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

Two rules to be met but with x bars between


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
PastaPesto @pastapesto Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by PastaPestoPastaPesto
7 years, 9 months ago.

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