Tradurre codice TS Multicharts in PRT

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #46460 quote
    enzo_52
    Participant
    Senior

    Salve, qualche anima pia potrebbe tradurre questo TS  di Multicharts in PRT?

    Grazie

    // EasyLanguage (TradeStation) / PowerLanguage (MultiCharts) code// EasyLanguage (TradeStation) / PowerLanguage (MultiCharts) code// basic code to play around with 🙂
    // DAX, 5min time frame, default settings, exchange time
    input:  RangeMultiplier(0.95), BegTime(0900), EndTime(0955), CloseTime(2155), SkipDay(Friday), MyContracts(1);
    variables: minSetup(0), maxSetup(0), slLong(0), slShort(0), daily_factor(false);

    If Date <> Date[1] then begin maxSetup = 0; minSetup = 0;
    daily_factor = absvalue(opend(1)-closed(1))<0.75*(highd(1)-lowd(1));end;
    If daily_factor and Time >= BegTime and Time <= EndTime and Dayofweek(date) <> SkipDay and EntriesToday(date) = 0 then begin
    If maxSetup = 0 then begin // do once @ BegTime maxSetup = HighD(0) + RangeMultiplier * (HighD(0) – LowD(0)); slLong = HighD(0); end;
    Buy(“LEx”) MyContracts contracts Next Bar at maxSetup stop;

    If minSetup = 0 then begin // do once @ BegTime minSetup = LowD(0) – RangeMultiplier * (HighD(0) – LowD(0)); slShort = LowD(0); end;
    SellShort(“SEx”) MyContracts contracts Next Bar at minSetup stop;
    end;
    Sell(“LXx”) from entry(“LEx”) Next Bar at slLong stop;BuyToCover(“SXx”) from entry(“SEx”) Next Bar at slShort stop;
    If Time >= CloseTime then begin Sell(“TimeLXx”) from entry(“LEx”) Next Bar market; BuyToCover(“TimeSXx”) from entry(“SEx”) Next Bar at market;end;
    Setstopcontract;SetStopLoss(1000);SetExitOnClose;

    #46498 quote
    Nicolas
    Keymaster
    Master

    Dove hai ricevuto questo codice? Qual è lo strumento e il tempo impiegato? Come sono finora i risultati della strategia? Grazie.

    #46505 quote
    enzo_52
    Participant
    Senior

    Un mio amico me lo ha dato. Lo strumento fimanziario e’ il Dax con TF 1h
    Tu lo sai tradurre in Prt ?
    Grazie

    #47815 quote
    enzo_52
    Participant
    Senior

    NESSUNA IDEA?

    #47822 quote
    R05
    Participant
    Veteran

    Ciao prova a vedere questo link in fondo alla pagina sul commento di Andrea Unger, mi sembra simile, puoi verificare, per comodità te lo riporto

    DEFPARAM FLATAFTER=215500 // replace closetime condition
    
    RangeMultiplier=0.95
    BegTime=090000
    EndTime=095500
    
    MyContracts=1
    
    SkipDay=dayofweek<>5
    if intradaybarindex=0 then
    maxSetup = 0
    minSetup = 0
    dailyfactor = abs(dOpen(1)-dClose(1))<0.75*(dHigh(1)-dLow(1))
    tradethisday=0
    else
    if barindex=tradeindex then
    tradethisday=1
    endif
    endif
    
    If dailyfactor and Time >= BegTime and Time <= EndTime and SkipDay and tradethisday=0 then
    if maxSetup=0 then
    maxSetup = dHigh(0) + RangeMultiplier * (dHigh(0) - dLow(0))
    slLong=dHigh(0)
    endif
    
    if minsetup=0 then
    minSetup = dLow(0) - RangeMultiplier * (dHigh(0) - dLow(0))
    slShort = dLow(0)
    endif
    
    Buy mycontracts contract at maxSetup stop
    Sell at slLong stop
    
    SellShort mycontracts contract at minSetup stop
    ExitShort at slShort stop
    endif
    
    If LongOnMarket then
    Sell at slLong stop
    elsif ShortOnMarket then
    ExitShort at slShort stop
    endif
    
    set stop loss 1000

     

    DAX 5 min automated trading by Andrea Unger

    #47939 quote
    enzo_52
    Participant
    Senior

    Grazie, visto le performance, non credo sia quello giusto,  bisognerebbe tradurre il codìdice che ho postato…

    comunque, grazie tante!!

    #48411 quote
    enzo_52
    Participant
    Senior

    dovrebbe seguire questa Equity

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

Tradurre codice TS Multicharts in PRT


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
enzo_52 @enzo_52 Participant
Summary

This topic contains 6 replies,
has 3 voices, and was last updated by enzo_52
8 years, 4 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 09/18/2017
Status: Active
Attachments: 1 files
Logo Logo
Loading...