buying condition from 2 TF’s

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #181369 quote
    assafnassafn
    Participant
    Average

    Hello,

    I’m trying to create a simple buying order that uses weekly and daily data.

    This is the code:

    timeframe(weekly)
    a=rsi[9]> 20
    timeframe(daily)
    b=rsi[9]>20

    if a and b then
    buy 10000 cash at market
    endif

    if rsi[9]>70 then
    sell at market
    endif

    Thanks in advance,

    Assaf

    #181370 quote
    assafnassafn
    Participant
    Average

    Please discard this topic. I couldn’t find how to delete it.

    #181372 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    It seems correct, even though I’d check for an exit BEFORE the entry.

    #181373 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Let’s keep it. You simply unsubscribe it, if subscribed.

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

buying condition from 2 TF’s


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
assafn @assafn Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by robertogozzirobertogozzi
4 years, 11 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/10/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...