Strategia di trading con ADX e media mobile

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • #52049 quote
    NicolasNicolas
    Keymaster
    Legend
    Gli “inputs” sono per la definizione di parametri esterni per gli utenti. È possibile definirli da soli con variabili come:
    mincon = 2
    maxcon = 2
    diff = 1.25
    risk = 1500
    “vars” è per dichiarare variabili, ma non è utile nella programmazione probacktest, non è necessario dichiarare le variabili se non contengono valore (= 0)
    Stefano Leone thanked this post
    #52288 quote
    Stefano LeoneStefano Leone
    Participant
    Junior
    Grazie mille dell’aiuto Nicolas, ti vorrei chiedere come mai sul CFD di °Us cash 500 nella piattaforma di ig posso tradare con minimo 5 contratti mentre mandando in esecuzione un sistema di Prt che agisce sullo stesso mercato posso partire anche con soli 3 contratti? PRT non dovrebbe sottostare alle regole di position sizing stabilite dal broker?
    #52293 quote
    NicolasNicolas
    Keymaster
    Legend
    Nella real live trading, dovrebbe utilizzare gli stessi contratti importo imposto dal broker di sicuro.
    #54619 quote
    Stefano LeoneStefano Leone
    Participant
    Junior

    Dunque ho inserito anche la posizione short nel sistema, con il seguente codie

    MMlungo= Average[200]
    MMcorto= Average[5]
    MyAdx = ADX[5]
    // posizione Long
    If close > mmlungo and close < mmcorto and myadx > 35 then
    buy at market
    endif
    if close > mmcorto then
    sell at market
    endif
    // posizione Short
    If close < mmlungo and close > mmcorto and myadx > 35 then
    sellshort at market
    endif
    if close < mmcorto then
    exitshort at market
    endif

    adesso vorrei migliorare un pò le cose inserendo altri parametri;

    1) con ordini al limite basati per il long su LOW senza (1) e per lo short su HIGH, oppure con lowest(LOW,2) per i long e highest(high,2) per gli short
    2) solo per gli short mettere un valore + alto di ADx, tipo 38,40,42,43…

    #54623 quote
    NicolasNicolas
    Keymaster
    Legend

    Di seguito riportiamo le modifiche per operare con gli ordini LIMIT, se ho capito correttamente la tua richiesta.

    MMlungo= Average[200]
    MMcorto= Average[5]
    MyAdx = ADX[5]
    // posizione Long
    If close > mmlungo and close < mmcorto and myadx > 35 then
    buy at lowest[2](low) LIMIT
    endif
    if close > mmcorto then
    sell at market
    endif
    // posizione Short
    If close < mmlungo and close > mmcorto and myadx > 35 then
    sellshort at highest[2](high) LIMIT
    endif
    if close < mmcorto then
    exitshort at market
    endif

    Tieni presente che questi ordini limite durano solo una barra subito dopo le rilevazioni delle condizioni delle voci.

Viewing 5 posts - 16 through 20 (of 20 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 di trading con ADX e media mobile


ProOrder: Trading Automatico & Backtesting

New Reply
Author
Summary

This topic contains 19 replies,
has 2 voices, and was last updated by NicolasNicolas
8 years, 10 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 07/30/2017
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...