Difficoltà codice divergenza

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #15653 quote
    Luigi5192
    Participant
    Average

    salve a tutti ho bisogno di aiuto, perchè non riesco a creare un codice dove viene utilizata la divergenza dell’indicatore stocastico lento.

    cioè il sistema deve comprare quando c’è questa divergenza dell’indicatore con i punti di swing del mercato.

    Come dovrei impostare il codice affinchè il sistema capisca della divergenza?

    grazie.

    #18552 quote
    Nicolas
    Keymaster
    Master

    Ho appena codificato un indicatore stocastico divergenza a causa di una nuova richiesta sul forum. È possibile trovare il codice e il file indicatore in questo argomento: stochastic divergence indicator prorealtime

    #18586 quote
    Luigi5192
    Participant
    Average

    Ma bisogna tararlo in base al time frame oppure e standard?

    grazie.

    #18594 quote
    Nicolas
    Keymaster
    Master

    È possibile aggiungere l’indicatore su qualsiasi periodo di tempo che si desidera e anche modificare i parametri a piacimento = stocastica periodo / K% e D% nella finestra di indicazione.

    #18595 quote
    Luigi5192
    Participant
    Average

    grazie per la risposta, e scusa per il tempo che le faccio perdere.

    volevo chiederla se ci sono due max consecutivi e l’indicatore segna due line sopra lo 0 in corispondenza dei max, come devo impostare il sistema per dirgli compra in short in questa siruazione?

    grazie, saluti.

    #18600 quote
    Nicolas
    Keymaster
    Master

    Secondo questo indicatore di divergenza valori restituiti, il codice per acquisto o vendita sarebbe questo:

    DEFPARAM CumulateOrders = False 
    
    indicator1, ignored, ignored = CALL "Divergence stochastic"[14, 80, 20, 3, 6](close)
    
    c1 = (indicator1 > 0)
    
    IF c1 THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    c2 = (indicator1 < 0)
    
    IF c2 THEN 
    SELLSHORT 1 CONTRACT AT MARKET 
    ENDIF 
    #18601 quote
    Luigi5192
    Participant
    Average

    ok grazie è tutto chiaro.

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

Difficoltà codice divergenza


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Luigi5192 @luigi5192 Participant
Summary

This topic contains 6 replies,
has 2 voices, and was last updated by Luigi5192
9 years, 1 month ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 10/27/2016
Status: Active
Attachments: No files
Logo Logo
Loading...