Strategia long short con candele

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #194825 quote
    Ciccarelli FrancoCiccarelli Franco
    Participant
    Senior

    Mi piacerebbe codificare una strategia letta su una rivista di trading e precisamente:

    Entrare long dopo una serie di candele discendenti e l’ultima copre interamente la precedente con massimi e minimi e con apertura chiusura, viceversa per vendita allo scoperto. Per le rispettive chiusure non ho idea, cerco un aiuto.

    Grazie

    #194834 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Ecco fatto:

    N          = 5
    Rialzista  = close > open
    Ribassista = close < open
    L1 = (summation[N](Ribassista) = N)
    S1 = (summation[N](Rialzista)  = N)
    X1 = high >= high[1]
    X2 = low  <= low[1]
    X3 = max(open,close) >= max(open[1],close[1])
    X4 = min(open,close) <= min(open[1],close[1])
    Lcond = L1 AND X1 AND X2 AND X3 AND X4 AND Not OnMarket
    Scond = S1 AND X1 AND X2 AND X3 AND X4 AND Not OnMarket
    IF Lcond THEN
       BUY 1 CONTRACT AT MARKET
    ENDIF
    IF Scond THEN
       SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    SET TARGET pPROFIT 300
    SET STOP   pLOSS   100
    #194836 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Io ho messo uno Stop Loss ed un Take Profit per provarlo, tu potrai cambiare entrambi come preferisci.

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

Strategia long short con candele


ProOrder: Trading Automatico & Backtesting

New Reply
Summary

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

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 06/07/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...