Strategia long short con candele

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

    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
    robertogozzi
    Moderator
    Master

    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
    robertogozzi
    Moderator
    Master

    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.

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 robertogozzi
3 years, 9 months ago.

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