Übersetzung von Strategien in Easy Language

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #72988 quote
    Marc
    Participant
    Average

    Hallo Zusammen,

    ich habe einen Basket an verschiedenen EA’s die in Equilla geschrieben wurden. Kann einer von euch helfen diese in Easy Language zu portieren?
    Ein Test der Strategien in Kombination hat dort eine schöne Ertragskurve ergeben und mich würde interessieren, ob dies hier auch der Fall wäre.
    Gerne poste ich im Anschluss die Settings, die ich für diverse Underlyings benutze.

    Hier die jeweiligen Codes der Strategien:

    Fractal Adaptive Band Breakout:

    Inputs:
    	Preis( (H+L) / 2 ),
    	N( 16, 1 ), // Must be even
    	Standardabweichung( 2.0, 0.0 ),
    	TrailAmount( 0.5 ),
    	Visuals( False );
    	
    Variables:
    	mean, Abweichung, unteresBand, oberesBand;
    
    mean = FRAMA( Preis, N );
    Abweichung = Standardabweichung( mean, N );
    
    unteresBand = mean - Standardabweichung * Abweichung;
    oberesBand = mean + Standardabweichung * Abweichung;
    
    If CurrentBar > 1 Then
    	If Low Crosses Over unteresBand Then
    		Buy Next Bar at unteresBand Stop
    	Else If High Crosses Under oberesBand Then
    		Short Next Bar at oberesBand Stop;
    	
    SetStopMode( ModeShare );
    SetStopProfitTrailing( TrailAmount );
    SetStopProfitTarget( 3 * TrailAmount );
    
    If Visuals Then
    	DrawArea( oberesBand, unteresBand, "BandOben", "BandUnten", TransparentColor( LightGray, 100 ), Transparent, Transparent );

    Relative Strength Index Zone System:

    Inputs:
    	Price( Close ), 
    	Period( 14, 1 ), 
    	OverBought( 70, 0, 100 ),
    	OverSold( 30, 0, 100 ), 
    	Bullish( LongEntry, ShortExit, NoBullishSignal ) = LongEntry,
    	Bearish( LongExit, ShortEntry, NoBearishSignal ) = LongExit;
    
    Variables: 
    	rsiVal;
    
    rsiVal = RSI( Price, Period );
    
    If Bullish <> NoBullishSignal Then
    	If rsiVal Crosses Over OverSold Then 
    		If Bullish = LongEntry Then 
    			Buy Next Bar at Market
    		Else If Bullish = ShortExit Then 
    			Cover Next Bar at Market;
    
    If Bearish <> NoBearishSignal Then
    	If rsiVal Crosses Under OverBought Then 
    		If Bearish = LongExit Then 
    			Sell Next Bar at Market
    		Else If Bearish = ShortEntry Then 
    			Short Next Bar at Market;

    Relative Strength Levy:

    Inputs:		
    	Preis( Close ), 
    	Period( 14, 1 ),
    	EntryMethod( LongEinstieg, ShortEinstieg, Both ) = Both;
    			
    Variables: 
    	result, LongSignal, ShortSignal, PivotValue(1);
    
    result = RSL( Preis, Period );
    
    LongSignal = ( result Crosses Over PivotValue ) And ( EntryMethod <> ShortEinstieg );
    ShortSignal = ( result Crosses Under PivotValue ) And ( EntryMethod <> LongEinstieg );
    
    If LongSignal Then
    	Buy( "RSLevy" ) Next Bar at Market
    Else If ShortSignal Then
    	Short( "RSLevy" ) Next Bar at Market;

    Ulcer Index:

    Inputs:		
    	Price( Close ),
    	Period( 10, 1 ),
    	LookBack( 2, 1 ),
    	EntryMethod( LongEntry, ShortEntry, Both ) = Both;
    			
    Variables: 
    	result, longSig, shortSig;
    
    result = UlcerIndex( Price, Period );
    
    longSig = ( result > result[LookBack] ) And ( Close > Open ) And ( EntryMethod <> ShortEntry );
    shortSig = ( result > result[LookBack] ) And ( Close < Open ) And ( EntryMethod <> LongEntry );
    
    If longSig Then
    	Buy( "Ulcer" ) Next Bar at Market
    Else If shortSig Then
    	Short( "Ulcer" ) Next Bar at Market;

    Vielen Dank die Hilfe im Voraus

    Marc

    #72989 quote
    Marc
    Participant
    Average

    Am Ende des Tages, sollen diese Strategien kombiniert miteinander genutzt werden können (am besten als ein kompletter EA).

    #72996 quote
    Nicolas
    Keymaster
    Master

    Hallo, danke für diese Codes, lass mich schauen, wie ich sie für prorealtime genau konvertieren kann…

    #72998 quote
    Marc
    Participant
    Average

    Hallo Nicolas,

    danke für Deine Rückmeldung.

    Ich poste einfach mal hier die Equitykurve bzw. den 3 Jahres EoD Backtest als Screenshot. Ich hoffe nicht, dass die Arbeit umsonst ist.

     

    VG und Danke Marc

    #73001 quote
    Nicolas
    Keymaster
    Master

    Nur um klar zu sein, ich werde diese Strategien für ProRealTime übersetzen. Ich stelle hier keinen EasyLanguage Programmiercode zur Verfügung !!

    Ist diese Eigenkapitalkurve das Ergebnis aller kombinierten Strategien? Nur für Bund im täglichen Zeitraum?

    #73003 quote
    Marc
    Participant
    Average

    Hallo Nicolas,

    die Equitykurve bildet das Ergebnis des rollierenden Bund Future im täglichen Zeitraum, in Form aller kombinierten Strategien,  ab.

    Die Übersetzung in Prorealtime wäre super.  Sofern die Möglichkeit besteht die Parameter zu ergänzen und das hier über PRT laufen zu lassen bzw. zu testen wäre das perfekt.

    LG Marc

    #73015 quote
    Nicolas
    Keymaster
    Master

    Dies ist die erste Strategie, die Breakouts der FRAMA-Bänder.

    defparam cumulateorders=false
    
    //Fractal Adaptive Band Breakout
    
    N = 16
    StandardDev = 2.0
    TrailAmount = 0.5
    
    //FRAMA
    pri=medianprice
    len=N
     
    N3=(Highest[len](High)-Lowest[len](Low))/len
     
    mH=High
    L=Low
     
    For count=0 To len/2-1
    If High[count] > mH Then
    mH=High[count]
    Endif
     
    If Low[count] < L Then
    L=Low[count]
    Endif
    Next
     
    N1=(mH-L)/(len/2)
     
    HH=High[len/2]
    LL=Low[len/2]
     
    For count=len/2 To len-1
    If High[count] > HH Then
    HH=High[count]
    Endif
     
    If Low[count] < LL Then
    LL=Low[count]
    Endif
    Next
     
    N2=(HH-LL)/(len/2)
     
    If N1 > 0 And N2 > 0 And N3 > 0 Then
    Dimen=(Log(N1+N2)-Log(N3))/Log(2)
    Endif
     
    alpha=Exp(-4.6*(Dimen-1))
     
    If alpha < 0.01 Then
    alpha=0.01
    Endif
     
    If alpha > 1 Then
    alpha=1
    Endif
     
    Filt=alpha*pri+(1-alpha)*Filt[1]
     
    //If Barindex < len+1 Then
    //Filt=pri
    //Endif
    
    stddev = std[N](Filt)
    lowerband = Filt-stddev*StandardDev
    upperband = Filt+stddev*StandardDev
    
    if low crosses over lowerband then
    buy 1 contract at lowerband stop
    elsif high crosses under upperband then
    sellshort 1 contract at upperband stop
    endif
    
    set stop trailing TrailAmount
    set target profit TrailAmount*3
    #73025 quote
    Marc
    Participant
    Average

    Dankeschön für den ersten Teil 🙂

     

    Ich poste heute Abend mal meine Settings für EURUSD, BUND, DAX, Gold und WTI dazu..

    #73041 quote
    Marc
    Participant
    Average

    Hallo Zusammen,

    anbei die Settings die ich für profitabel erachtet habe:
    EURUSD: N = 28   StandardDev = 0.13   TrailAmount = 0.15
    DAX: N = 4   StandardDev = 0.50   TrailAmount = 69
    WTI Crude: N = 4   StandardDev = 0.50   TrailAmount = 69
    Gold: N = 3   StandardDev = 3   TrailAmount = 9
    Euro-Bund: N = 2   StandardDev = 4.0   TrailAmount = 69

     


    @Nicolas
    :
    Könntest Du bei den anderen 3 Strategien ebenfalls helfen?

    VG und Danke
    Marc

    #73094 quote
    Nicolas
    Keymaster
    Master

    Natürlich! So bald wie möglich !! 🙂

    Marc thanked this post
    #73152 quote
    Marc
    Participant
    Average

    Hallo Zusammen,

    hier mal ein Backtest mit dem DAX auf täglicher Basis.
    Eine Frage hierzu. Ich nutze noch keine Realtime-Daten und habe entsprechend keine Tick-by-Tick-Daten. Ist dies relevant für das Ergebnis, oder sind diese Ergebnisse aussagekräftig?

    VG und Danke

    Marc

    #73174 quote
    Nicolas
    Keymaster
    Master

    Da es einen Trailing Stop gibt, der während eines Balkens auftreten kann, sind die Tick-by-Tick-Daten für diese Art von Analyse unbedingt erforderlich! Die Ergebnisse können sich in diesem Fall stark vom tatsächlichen Handel unterscheiden.

    #73175 quote
    Nicolas
    Keymaster
    Master

    Nachstehend finden Sie das Relative-Stärke-Index-Zonensystem:

    Price=Close
    Period=14
    OverBought=70
    OverSold=30
    
    Bullish = 1
    //LongEntry=1, ShortExit=2, NoBullishSignal=3 
    Bearish = 1
    //LongExit=1, ShortEntry=2, NoBearishSignal=3  
    rsiVal = RSI[Period](Price)
     
    If Bullish <> 3 Then
    If rsiVal Crosses Over OverSold Then
    If Bullish = 1 Then
    Buy at Market
    ElsIf Bullish = 2 Then
    exitshort at Market
    endif
    endif
    endif
     
    If Bearish <> 3 Then
    If rsiVal Crosses Under OverBought Then
    If Bearish = 1 Then
    Sell at Market
    ElsIf Bearish = 2 Then
    sellShort at Market
    endif
    endif
    endif
    #73218 quote
    Marc
    Participant
    Average

    Danke Dir mein lieber…

    Die Settings hierfür sind bei mir wie folgt:
    EURUSD: Price: Close Period: 2 OverBought: 95 OverSold: 10
    DAX: Price: Open Period: 2 OverBought: 95 OverSold: 3
    WTI Crude: Price: Open Period: 2 OverBought: 70 OverSold: 30
    Gold: Price: Close Period: 2 OverBought: 98 OverSold: 2
    Euro-Bund: Price: Close Period: 3 OverBought: 90 OverSold: 14

    #73266 quote
    Nicolas
    Keymaster
    Master

    Die Relative Strength Levy-Strategie:

    Preis= Close
    Period= 14
    LongEinstieg=1 //1=true ; 0=false 
    ShortEinstieg=1//1=true ; 0=false
    PivotValue = 1
       
    result = Preis/average[period] //RSL
    
    LongSignal = ( result Crosses Over PivotValue ) And ( LongEinstieg=1 )
    ShortSignal = ( result Crosses Under PivotValue ) And ( ShortEinstieg=1 )
    
    If LongSignal Then
    Buy at Market
    ElsIf ShortSignal Then
    sellShort at Market
    endif
Viewing 15 posts - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.

Übersetzung von Strategien in Easy Language


ProOrder: Automatischer Handel & Backtesting

New Reply
Author
author-avatar
Marc @mast83 Participant
Summary

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

Topic Details
Forum: ProOrder: Automatischer Handel & Backtesting
Language: German
Started: 06/12/2018
Status: Active
Attachments: 4 files
Logo Logo
Loading...