mediare long

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #38353 quote
    Alessio
    Participant
    Senior

     

    Sì acquistare freccia verde, vendo freccia rossa. Utilizzo il timeframe 15 minuti in manuale. grazie per il consiglio

    Vorrei gestire le posizioni individualmente, ogni acquisto ha il suo obiettivo. Ora utilizza il prezzo medio da quello che calcola l’obiettivo

    In secondo luogo, quando ha venduto l’ultima posizione e non ci sono posizioni aperte, non deve aprire un’altra posizione subito.

    Per aprire nuove posizioni deve attendere una caduta di prezzo
    buona giornata

    #38578 quote
    Alessio
    Participant
    Senior
    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = true // Posizioni cumulate attivate
    
    if not onmarket then
    buy 1 contract at market
    endif
    
    highestPrice = Highest[100](high)
    
    if not onmarket and ( highestPrice + 10*pointsize) < close  then
    buy 1 contract at market
    endif
    
    if longonmarket and tradeprice(1)-close>=10*pointsize then
    buy 1 contract at market
    endif
    if longonmarket and close > ( tradeprice (1)+10*pointsize) then
    sell 1 contract at market
    endif
    

    Buongiorno, vorrei togliere if not onmarket then buy 1 contract at market endif. Ma non funziona senza

    #39514 quote
    Alessio
    Participant
    Senior
    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = true // Posizioni cumulate attivate
    
    // Condizioni per entrare su posizioni long
    indicator1 = call "media triang + diff 2 medie"[4, 14, 63]
    c1 = (indicator1[1] CROSSES UNDER indicator1[2])
    indicator3 = CALL "media triang + diff 2 medie"[13, 280, 365]
    short = (indicator1 [1] < indicator3[1])
    long= (indicator1 [1] > indicator3[1])
    maxshares= COUNTOFLONGSHARES <=5 //10minifib 5 sp500
    longdistance=   close [1]< (TRADEPRICE-(70*pointsize))//71 ftsemib 6.75 sp 500
    exitdistance=  close [1]> (TRADEPRICE+(70*pointsize))//70
    if not onmarket and short and exitdistance then
    buy 1 shares at market
    endif
    IF c1 AND short  and maxshares and longdistance then
    BUY 1 SHARES AT MARKET
    ENDIF
    
    // Condizioni per uscire da posizioni long
    indicator4 = CALL "media triang + diff 2 medie"[4, 14, 63]
    indicator5 = CALL "media triang + diff 2 medie"[4, 14, 63]
    c3 = (indicator4[1] > indicator5[2])
    
    IF c3 and long and exitdistance  THEN
    SELL 1 shares AT MARKET
    ENDIF
    
    a=TriangularAverage[mm1](close)
    b=TriangularAverage[mm2](close)
    c=(a-b)
    z= TriangularAverage[mm3](close) +c
    return z
    

    Buongiorno, sto sviluppando una strategia  vorrei una vostra opinione se continuare a migliorarla oppure no, dovrei aggiungere anche una parte short appena ho tempo.

    tf 1min

    #39515 quote
    Nicolas
    Keymaster
    Master

    Apri l’argomento per ogni query separata, altrimenti sarebbe difficile catturare l’interesse di altre persone. Thanks!! 😉

Viewing 4 posts - 16 through 19 (of 19 total)
  • You must be logged in to reply to this topic.

mediare long


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Alessio @alessio Participant
Summary

This topic contains 18 replies,
has 2 voices, and was last updated by Nicolas
8 years, 7 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 06/12/2017
Status: Active
Attachments: 2 files
Logo Logo
Loading...