hi, kann bitte jemand den beigefügten code mal auf 200.000 kerzen testen?
dax, 30min.
danke
DEFPARAM CumulateOrders = true
noEntryBeforeTime = 090000
timeEnterBefore = time >= noEntryBeforeTime
noEntryAfterTime = 173000
timeEnterAfter = time < noEntryAfterTime
daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
if (high>alto[1]) and not (high<high[1] and low>low[1]) then
alto=high
basso=low
//markup=barindex
//markhigh=high
endif
if (low<basso[1]) and not (high<high[1] and low>low[1]) then
alto=high
basso=low
//markdown=barindex
//marklow=low
endif
if basso>basso[1] then
trend=1
endif
indicator1 = MACDline[12,26,9](close)
indicator2 = ExponentialAverage[9](indicator1)
c1 = (indicator1 CROSSES OVER indicator2)
pos=2+(strategyprofit/5000)
IF trend=1 and c1 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
BUY pos CONTRACT AT MARKET
ENDIF
//************************************************************************
//trailing stop function
trailingstart = 20 //trailing will start @trailinstart points profit
trailingstep = 30 //trailing step to move the "stoploss"
//reset the stoploss value
IF NOT ONMARKET THEN
newSL=0
ENDIF
//manage long positions
IF LONGONMARKET THEN
//first move (breakeven)
IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THEN
newSL = tradeprice(1)+trailingstep*pipsize
ENDIF
//next moves
IF newSL>0 AND close-newSL>=trailingstep*pipsize THEN
newSL = newSL+trailingstep*pipsize
ENDIF
ENDIF
//manage short positions
IF SHORTONMARKET THEN
//first move (breakeven)
IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THEN
newSL = tradeprice(1)-trailingstep*pipsize
ENDIF
//next moves
IF newSL>0 AND newSL-close>=trailingstep*pipsize THEN
newSL = newSL-trailingstep*pipsize
ENDIF
ENDIF
//stop order to exit the positions
IF newSL>0 THEN
SELL AT newSL STOP
EXITSHORT AT newSL STOP
ENDIF
//************************************************************************
GRAPH newSL as "trailing"
// Stops und Targets
SET STOP pLOSS 40
SET TARGET pPROFIT 81
Danke….
aber so dolle ist das leider nicht… schade…
Gefällt, lasse ich Demo-Modus mitlaufen
Habe in einer Kopie noch den Saisonalmultiplier vom Pathfinder -System mit reingepackt. Auch die Re-Invest -Strategie bisschen verändert.
Mal sehen. In einem halben Jahr wissen wir mehr.
setz mal rein den code bitte
@johnScher
kannst du bitte den code posten??
Danke
//-------------------------------------------------------------------------
// Hauptcode : 30M
//-------------------------------------------------------------------------
DEFPARAM CumulateOrders = true
// define saisonal position multiplier for each month 1-15 / 16-31 (>0 - long / <0 - short / 0 no trade)
// saisonal position multiplier found on ProRealTime explizit in Pathfindersystems
ONCE January1 = 3 //0 risk(3)
ONCE January2 = 0 //3 ok
ONCE February1 = 3 //3 ok
ONCE February2 = 3 //0 risk(3)
ONCE March1 = 3 //0 risk(3)
ONCE March2 = 2 //3 ok
ONCE April1 = 1 //3 ok
ONCE April2 = 3 //3 ok
ONCE May1 = 1 //0 risk(1)
ONCE May2 = 2 //0 risk(2)
ONCE June1 = 1 //1 ok
ONCE June2 = 2 //3 ok
ONCE July1 = 3 //1 chance
ONCE July2 = 2 //3 ok
ONCE August1 = 2 //1 chance 1
ONCE August2 = 3 //3 ok
ONCE September1 = 3 //0 risk(3)
ONCE September2 = 0 //0 ok
ONCE October1 = 3 //0 risk(3)
ONCE October2 = 2 //3 ok
ONCE November1 = 1 //1 ok
ONCE November2 = 3 //3 ok
ONCE December1 = 3 // 1 chance
ONCE December2 = 2 //3 ok
// set saisonal multiplier
currentDayOfTheMonth = OpenDay
midOfMonth = 15
IF CurrentMonth = 1 THEN
IF currentDayOfTheMonth <= midOfMonth THEN
saisonalPatternMultiplier = January1
ELSE
saisonalPatternMultiplier = January2
ENDIF
ELSIF CurrentMonth = 2 THEN
IF currentDayOfTheMonth <= midOfMonth THEN
saisonalPatternMultiplier = February1
ELSE
saisonalPatternMultiplier = February2
ENDIF
ELSIF CurrentMonth = 3 THEN
IF currentDayOfTheMonth <= midOfMonth THEN
saisonalPatternMultiplier = March1
ELSE
saisonalPatternMultiplier = March2
ENDIF
ELSIF CurrentMonth = 4 THEN
IF currentDayOfTheMonth <= midOfMonth THEN
saisonalPatternMultiplier = April1
ELSE
saisonalPatternMultiplier = April2
ENDIF
ELSIF CurrentMonth = 5 THEN
IF currentDayOfTheMonth <= midOfMonth THEN
saisonalPatternMultiplier = May1
ELSE
saisonalPatternMultiplier = May2
ENDIF
ELSIF CurrentMonth = 6 THEN
IF currentDayOfTheMonth <= midOfMonth THEN
saisonalPatternMultiplier = June1
ELSE
saisonalPatternMultiplier = June2
ENDIF
ELSIF CurrentMonth = 7 THEN
IF currentDayOfTheMonth <= midOfMonth THEN
saisonalPatternMultiplier = July1
ELSE
saisonalPatternMultiplier = July2
ENDIF
ELSIF CurrentMonth = 8 THEN
IF currentDayOfTheMonth <= midOfMonth THEN
saisonalPatternMultiplier = August1
ELSE
saisonalPatternMultiplier = August2
ENDIF
ELSIF CurrentMonth = 9 THEN
IF currentDayOfTheMonth <= midOfMonth THEN
saisonalPatternMultiplier = September1
ELSE
saisonalPatternMultiplier = September2
ENDIF
ELSIF CurrentMonth = 10 THEN
IF currentDayOfTheMonth <= midOfMonth THEN
saisonalPatternMultiplier = October1
ELSE
saisonalPatternMultiplier = October2
ENDIF
ELSIF CurrentMonth = 11 THEN
IF currentDayOfTheMonth <= midOfMonth THEN
saisonalPatternMultiplier = November1
ELSE
saisonalPatternMultiplier = November2
ENDIF
ELSIF CurrentMonth = 12 THEN
IF currentDayOfTheMonth <= midOfMonth THEN
saisonalPatternMultiplier = December1
ELSE
saisonalPatternMultiplier = December2
ENDIF
ENDIF
// end saisonal multiplier
// start main code
noEntryBeforeTime = 090000
timeEnterBefore = time >= noEntryBeforeTime
noEntryAfterTime = 173000
timeEnterAfter = time < noEntryAfterTime
daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
if (high>alto[1]) and not (high<high[1] and low>low[1]) then
alto=high
basso=low
//markup=barindex
//markhigh=high
endif
if (low<basso[1]) and not (high<high[1] and low>low[1]) then
alto=high
basso=low
//markdown=barindex
//marklow=low
endif
if basso>basso[1] then
trend=1
endif
indicator1 = MACDline[12,26,9](close)
indicator2 = ExponentialAverage[9](indicator1)
c1 = (indicator1 CROSSES OVER indicator2)
pos=2+(strategyprofit/5000)
IF trend=1 and c1 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
BUY pos*saisonalpatternmultiplier CONTRACT AT MARKET
ENDIF
//************************************************************************
//trailing stop function
trailingstart = 20 //trailing will start @trailinstart points profit
trailingstep = 30 //trailing step to move the "stoploss"
//reset the stoploss value
IF NOT ONMARKET THEN
newSL=0
ENDIF
//manage long positions
IF LONGONMARKET THEN
//first move (breakeven)
IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THEN
newSL = tradeprice(1)+trailingstep*pipsize
ENDIF
//next moves
IF newSL>0 AND close-newSL>=trailingstep*pipsize THEN
newSL = newSL+trailingstep*pipsize
ENDIF
ENDIF
//manage short positions
IF SHORTONMARKET THEN
//first move (breakeven)
IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THEN
newSL = tradeprice(1)-trailingstep*pipsize
ENDIF
//next moves
IF newSL>0 AND newSL-close>=trailingstep*pipsize THEN
newSL = newSL-trailingstep*pipsize
ENDIF
ENDIF
//stop order to exit the positions
IF newSL>0 THEN
SELL AT newSL STOP
EXITSHORT AT newSL STOP
ENDIF
//************************************************************************
// Stops und Targets
SET STOP pLOSS 40
SET TARGET pPROFIT 81