Incroci su resistenze e supporti pivot

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #244427 quote
    MaoRai54
    Participant
    Master

    Roberto, molte grazie.

    Se io ho, ad esempio, 3 supporti come faccio a mettere una variabile che mi dica quale è il migliore dei 3 in una condizione come quella qui sotto ?

    IF NOT ONMARKET AND close crosses under SupX (dove deve dirmi quale usare tra 1 2 e 3)

    Grazie in anticipo

    #244441 quote
    robertogozzi
    Moderator
    Master

    Se intendi il minimo dei 3 eccolo (per il massimo basta che usi MAX al posto di MIN):

    IF NOT ONMARKET AND close crosses under min(Sup1,min(Sup2,Sup3))

    Lo stesso per le resistenze.

    #244444 quote
    MaoRai54
    Participant
    Master

    in realtà intendo il migliore, cioè quello che mi da il miglior backtest

    #244486 quote
    robertogozzi
    Moderator
    Master

    Usa gli array e la variabile X (o qualunque altro nome di tua preferenza) per ottimizzare quel livello, lo stesso puoi farlo con le Resistenze ed i punti Intermedi:

    Pivot   = (DHigh(1) + DLow(1) + DClose(1))/3
    $Sup[1] = 2*((DHigh(1) + DLow(1) + DClose(1))/3) - DHigh(1)
    $Sup[2] = (DHigh(1) + DLow(1) + DClose(1))/3-(DHigh(1)-DLow(1))
    $Sup[3] = DHigh(1)+2*(((DHigh(1) + DLow(1) + DClose(1))/3)-DLow(1))
    //
    Livello = $Sup[X]
    IF close CROSSES UNDER Livello THEN
       SELLSHORT AT MARKET
       SET STOP   %LOSS   0.5
       SET TARGET %PROFIT 1.5
    ENDIF
    MaoRai54 thanked this post
Viewing 4 posts - 16 through 19 (of 19 total)
  • You must be logged in to reply to this topic.

Incroci su resistenze e supporti pivot


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
tradingpro @tradingpro Participant
Summary

This topic contains 18 replies,
has 2 voices, and was last updated by robertogozzi
11 months, 2 weeks ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 03/09/2019
Status: Active
Attachments: 6 files
Logo Logo
Loading...