Close of last x candels above sma

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #93073 quote
    guitarrocker
    Participant
    Average

    Hi guys,

    How can I define the No. of candles? e.g.:

    IF (close and close[1] and close[2] and close[3] and close [4] and close… (ALL candlecloses up to x) > sma[50]) and RSI>50) THEN
    BUY 1 CONTRACTS AT MARKET
    SET STOP pLoss 10
    SET TARGET pPROFIT 20
    ENDIF

     

    Thanks in advance!

    #93080 quote
    robertogozzi
    Moderator
    Master

    To check that conditions are met for ALL “x” periods:

    IF summation[x](close > sma[50]) = x THEN

    For just more then 50%:

    IF summation[x](close > sma[50]) >= (x/2) THEN

    For at least one within “x” periods:

    IF summation[x](close > sma[50]) THEN
    guitarrocker thanked this post
    #93139 quote
    guitarrocker
    Participant
    Average

    Thank you @robertogozzi

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Close of last x candels above sma


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by guitarrocker
6 years, 12 months ago.

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