Hello Niklas.
The system works like
dax 40
07.00 a position is opened
Long if close between pivot and support1
Take profit is the pivot
Stop lot is 400 points
If the TP or SL is not reached by 22.00, then
close the position if the position is in profit
do not close the position if the position is not in profit and set a new TP on the buy price.
if the position remains in the negative for 1 year the position is closed
Short accordingly against resistance 1.
There is a new pivot every day and PRT can not hold the respective pivot but calculates an average and adjusts SL and TP.
Hallo Niklas. Das System funktioniert wie Dax 40 07.00 Uhr. Eine Position wird geöffnet. Long wenn geschlossen zwischen Pivot und Support1. Take Profit ist der Pivot. Stop Lot ist 400 Punkte die Position nicht schließen, wenn die Position nicht profitabel ist, und einen neuen TP auf den Kaufpreis setzen. bleibt die Position 1 Jahr im Minus, wird die Position Short entsprechend gegen Widerstand 1 geschlossen. Es gibt jeden Tag einen neuen Pivot und PRT kann den jeweiligen Pivot nicht halten, berechnet aber einen Durchschnitt und passt SL und TP an. https://www.prorealcode.com/topic/again-a-question-to-the-pivot/
Hello Razz.
You can give greetings again
I m sorry, I no longer have time for the platform there. The constant posting and being there has robbed me of my time.
From time to time I look in, have also sporadically read along now and then. You are a great crew there.
until then
Hallo Razz. Sie können wieder grüßen. Tut mir leid, ich habe keine Zeit mehr für den Bahnsteig dort. Das ständige posten und dabei sein hat mir meine Zeit geraubt. Ab und zu schaue ich rein, habe auch hin und wieder sporadisch mitgelesen. Ihr seid dort eine tolle Truppe. bis dann
RazzParticipant
Master
Hallo Nicolas
Haben Sie meine Antwort auf Ihre Frage gelesen (05/16/2022 at 2:42 PM) und wurde Ihnen nun klar was Ich möchte .
Und können Sie bestätigen das es nicht möglich ist
dies unter Pro Realtime so umzusetzten ?
Danke für Ihre Antwort
@JohnScher
Poste nur in der Sprache des Forums in dem du postest. Zum Beispiel Englisch nur in englischen Foren und Deutsch nur in deutschen Foren.
Danke 🙂
Hallo Nicolas Danke für Ihre Nachfrage .
1. Trades die bis 22:00 im Gewinn sind sollen geschlossen werden .
2. Trades die im laufe des aktuellen Handelstages 400 Punkte im Minus sind sollen geschlossen werden
3. Trades die weder ins Ziel gelaufen sind noch Bedingung 1 oder 2 erfüllen sollen geschlossen werden sobald der Kurs der jeweiligen Tradeeröffnung erreicht wird ( das kann auch Wochen später sein )
es soll aber in dieser Zeit normal weitergehandelt werden.
4. Falls 3. programmierbar ist wird es entweder einen Zeitstopp geben oder eine Bb Punkt 3 so umsetztbar ist (Ich vermute eher nicht so wie es auch JohnScher im Post 05/10/2022 at 9:47 PM geschrieben hat )
Im vorraus Vielen Dank
Hier ist die Version mit den Punkten 1 und 2 implementiert:
/*
1. Trades that are profitable by 22:00 should be closed.
2. Trades that are 400 points down during the current trading day should be closed
*/
DEFPARAM CumulateOrders = true
ONCE Distance = 6 * PipSize //6 pips is the distance required by the broker
IF Not OnMarket THEN
Flag = 0
ENDIF
// CALCULATION Low/High
if OpenDayOfWeek = 1 and TIME>= 000001 AND TIME<= 220000 THEN
H3 = DLow(2)
H4 = DHigh(2)
H5 = Dopen(2)
H6 = DClose(2)
endif
if OpenDayOfWeek = 2 or 3 or 4 or 5 and TIME>= 000001 AND TIME<= 220000 THEN
H3 = DLow(1)
H4 = DHigh(1)
H5 = Dopen(1)
H6 = DClose(1)
endif
R1=(2*PP) - H3
PP=(H3+H4+H6+H6)/4
S1=(2*PP) - H4
//1. Trades that are profitable by 22:00 should be closed.
IF OnMarket THEN
IF Time >= 220000 THEN
IF PositionPerf > 0 THEN
SELL AT Market
EXITSHORT AT Market
ELSE
Flag = 1
ENDIF
ENDIF
ENDIF
//2. Trades that are 400 points down during the current trading day should be closed
if longonmarket then
drawdown = positionprice-close
if drawdown >=400*pointsize then
sell at market
endif
elsif shortonmarket then
drawdown = close-positionprice
if drawdown >=400*pointsize then
exitshort at market
endif
endif
/*
Difference = abs(close - PositionPrice)
IF Difference < Distance THEN
Difference = Distance// - Difference
ELSE
Difference = 0
ENDIF
IF Flag = 1 THEN
IF LongOnMarket THEN
IF close > PositionPrice THEN
SELL AT PositionPrice + Difference STOP
ELSE
SELL AT PositionPrice + Difference LIMIT
ENDIF
ELSIF ShortOnMarket THEN
IF close > PositionPrice THEN
EXITSHORT AT PositionPrice - Difference LIMIT
ELSE
EXITSHORT AT PositionPrice - Difference STOP
ENDIF
ENDIF
ENDIF*/
L1 = (close > S1) // Range unten
L2 = (close < R1) // Range oben
L3 = (close < PP) // Bedingung Long
S3 = (close > PP) // Bedingung Short
ELL = (close >= PP) // Tradeziel Long
ELS = (close <= PP) // Tradeziel Short
c0 = opentime=070000 // Tradestart open 0700
// Conditions for entering long positions
IF L1 and L2 AND L3 and c0 and (Flag = 0 OR (Flag AND LongOnMarket)) THEN
BUY 1 CONTRACT AT MARKET
ENDIF
// Conditions for exit from long positions
IF LONGOnMarket AND ELL AND Flag = 0 THEN
SELL AT MARKET
ENDIF
// Conditions for entering short positions
IF L1 and L2 AND S3 and c0 and (Flag = 0 OR (Flag AND ShortOnMarket)) THEN
SellShort 1 CONTRACT AT MARKET
ENDIF
// Conditions for exiting short positions
IF ShortOnMarket AND ELS AND Flag = 0 THEN
EXITSHORT AT MARKET
ENDIF
Ich habe das Codeschnipsel “Differenz” entfernt, weil ich nicht glaube, dass es noch relevant ist.
Zu Punkt 3: Zu welchem Zeitpunkt genau sollten wir die Order X zum Breakeven stellen? wenn eine nachfolgende Order eröffnet wird?
RazzParticipant
Master
Hallo Nicolas Danke für Ihre Zeit
Um 22:00 soll das neue Ziel für die Order dann der Breakeven sein .
RazzParticipant
Master
Punkt 4 habe Ich neu Formuliert der war nicht komplett .
1. Trades die bis 22:00 im Gewinn sind sollen geschlossen werden.
2. Trades die im Laufe des aktuellen Handelstages 400 Punkte im Minus sind sollen geschlossen werden
3. Trades die weder ins Ziel gelaufen sind noch Bedingung 1 oder 2 erfüllen sollen geschlossen werden sobald der Kurs der jeweiligen Tradeeröffnung erreicht wird (das kann auch Wochen später sein)
es soll aber in dieser Zeit normal weitergehandelt werden.
4. Falls Punkt 3 programmierbar ist soll es entweder einen Zeitstopp geben zb. Wenn die Position nach x Handelstagen nicht Breakeven erreicht hat soll Sie dann zum Close 22:00
Geschlossen werden, oder eine max. Trade Begrenzung auf zum Beispiel max. 6 Trades gleichzeitig
ok, also denke ich, dass diese Version in diesem Fall funktionieren sollte:
/*
1. Trades that are profitable by 22:00 should be closed.
2. Trades that are 400 points down during the current trading day should be closed
*/
DEFPARAM CumulateOrders = true
ONCE Distance = 6 * PipSize //6 pips is the distance required by the broker
IF Not OnMarket THEN
Flag = 0
ENDIF
// CALCULATION Low/High
if OpenDayOfWeek = 1 and TIME>= 000001 AND TIME<= 220000 THEN
H3 = DLow(2)
H4 = DHigh(2)
H5 = Dopen(2)
H6 = DClose(2)
endif
if OpenDayOfWeek = 2 or 3 or 4 or 5 and TIME>= 000001 AND TIME<= 220000 THEN
H3 = DLow(1)
H4 = DHigh(1)
H5 = Dopen(1)
H6 = DClose(1)
endif
R1=(2*PP) - H3
PP=(H3+H4+H6+H6)/4
S1=(2*PP) - H4
//1. Trades that are profitable by 22:00 should be closed.
IF OnMarket THEN
IF Time >= 220000 THEN
IF PositionPerf > 0 THEN
SELL AT Market
EXITSHORT AT Market
ELSE
set target breakeven //3. Trades that have neither reached the target nor meet condition 1 or 2 should be closed as soon as the price of the respective trade opening is reached (this can also be weeks later)
Flag = 1
ENDIF
ENDIF
ENDIF
//2. Trades that are 400 points down during the current trading day should be closed
if longonmarket then
drawdown = positionprice-close
if drawdown >=400*pointsize then
sell at market
endif
elsif shortonmarket then
drawdown = close-positionprice
if drawdown >=400*pointsize then
exitshort at market
endif
endif
L1 = (close > S1) // Range unten
L2 = (close < R1) // Range oben
L3 = (close < PP) // Bedingung Long
S3 = (close > PP) // Bedingung Short
ELL = (close >= PP) // Tradeziel Long
ELS = (close <= PP) // Tradeziel Short
c0 = opentime=070000 // Tradestart open 0700
// Conditions for entering long positions
IF L1 and L2 AND L3 and c0 and (Flag = 0 OR (Flag AND LongOnMarket)) THEN
BUY 1 CONTRACT AT MARKET
set stop loss 0
set target profit 0
ENDIF
// Conditions for exit from long positions
IF LONGOnMarket AND ELL AND Flag = 0 THEN
SELL AT MARKET
ENDIF
// Conditions for entering short positions
IF L1 and L2 AND S3 and c0 and (Flag = 0 OR (Flag AND ShortOnMarket)) THEN
SellShort 1 CONTRACT AT MARKET
set stop loss 0
set target profit 0
ENDIF
// Conditions for exiting short positions
IF ShortOnMarket AND ELS AND Flag = 0 THEN
EXITSHORT AT MARKET
ENDIF
//graph be
//graph drawdown
RazzParticipant
Master
Hallo Nicolas
Leider war es doch nicht so einfach Schauen Sie das Bild an dort sehen Sie das es nicht funktioniert hat.
Die blaue Linie im Chart ist das Ziel des Jeweiligen Trades .
Hier wird Trade 1 mit Trade 2 zusammen geschlossen was so nicht richtig ist .
Trade 1 hätte offen bleiben müssen und Trade 2 beim berühren des blauen Linie geschlossen werden müssen .
Schauen Sie es sich bitte einmal an .
Entschuldigung, aber wer hat gesagt, dass es einfach ist? 😆 Was ist das für eine blaue Linie? Ist es ein Teil des Strategiecodes, der ursprünglich in diesem Thema gepostet wurde? Warum sollte die Bestellung dort bitte geschlossen worden sein?
RazzParticipant
Master
Die blaue Linie zeigt den PP (Pivot Punkt HLCC/4) (Zeile 28 des Codes )
Und ist gleichzeitig das Ziel für die Trades Bedingung (ELL / ELS Zeile 61 und 62 des Codes)
Alles in Ihrem letzten Strategiecode enthalten.
Und funktioniert eigentlich es gibt erst Probleme wenn ein Trade nicht geschlossen wurde und ein neuer Trade aufgemacht wird dann kommt irgendwas mit
dem Breakeven der einzelnen Trades durcheinander .
Im Anhang der Trade von gestern der wurde heute zum Beispiel ordnungsgemäß beendet .
Hoffe es ist verständlich ?
Wenn es 2 oder mehr Aufträge gibt, müssen wir die teilweise Schließung der aktuellen globalen Position verwenden (der mittlere Eröffnungspreis ist POSITIONPRICE). Wir können keine bestimmte Order schließen (z. B. die am weitesten entfernte oder die gewinnbringendere, …). In der folgenden Version habe ich diese teilweise Schließung im Fall von flag=1 hinzugefügt (deshalb wurde in der vorherigen Version nichts geschlossen).
/*
1. Trades that are profitable by 22:00 should be closed.
2. Trades that are 400 points down during the current trading day should be closed
*/
DEFPARAM CumulateOrders = true
ONCE Distance = 6 * PipSize //6 pips is the distance required by the broker
IF Not OnMarket THEN
Flag = 0
ENDIF
// CALCULATION Low/High
if OpenDayOfWeek = 1 and TIME>= 000001 AND TIME<= 220000 THEN
H3 = DLow(2)
H4 = DHigh(2)
H5 = Dopen(2)
H6 = DClose(2)
endif
if OpenDayOfWeek = 2 or 3 or 4 or 5 and TIME>= 000001 AND TIME<= 220000 THEN
H3 = DLow(1)
H4 = DHigh(1)
H5 = Dopen(1)
H6 = DClose(1)
endif
R1=(2*PP) - H3
PP=(H3+H4+H6+H6)/4
S1=(2*PP) - H4
//1. Trades that are profitable by 22:00 should be closed.
IF OnMarket THEN
IF Time >= 220000 THEN
IF PositionPerf > 0 THEN
SELL AT Market
EXITSHORT AT Market
ELSE
set target breakeven //3. Trades that have neither reached the target nor meet condition 1 or 2 should be closed as soon as the price of the respective trade opening is reached (this can also be weeks later)
Flag = 1
ENDIF
ENDIF
ENDIF
//2. Trades that are 400 points down during the current trading day should be closed
if longonmarket then
drawdown = positionprice-close
if drawdown >=400*pointsize then
sell at market
endif
elsif shortonmarket then
drawdown = close-positionprice
if drawdown >=400*pointsize then
exitshort at market
endif
endif
L1 = (close > S1) // Range unten
L2 = (close < R1) // Range oben
L3 = (close < PP) // Bedingung Long
S3 = (close > PP) // Bedingung Short
ELL = (close >= PP) // Tradeziel Long
ELS = (close <= PP) // Tradeziel Short
c0 = opentime=070000 // Tradestart open 0700
// Conditions for entering long positions
IF L1 and L2 AND L3 and c0 and (Flag = 0 OR (Flag AND LongOnMarket)) THEN
BUY 1 CONTRACT AT MARKET
set stop loss 0
set target profit 0
ENDIF
// Conditions for exit from long positions
IF LONGOnMarket AND ELL THEN
if Flag = 0 then
SELL AT MARKET
else
sell 1 contract at market
ENDIF
endif
// Conditions for entering short positions
IF L1 and L2 AND S3 and c0 and (Flag = 0 OR (Flag AND ShortOnMarket)) THEN
SellShort 1 CONTRACT AT MARKET
set stop loss 0
set target profit 0
ENDIF
// Conditions for exiting short positions
IF ShortOnMarket AND ELS THEN
if flag=0 then
EXITSHORT AT MARKET
else
exitshort 1 contract at market
ENDIF
endif
//graph be
//graph drawdown
RazzParticipant
Master
Guten Morgen Nicolas
Vielen Dank für Ihren Einsatz und Ihre Zeit wirklich finde Ich echt super .
Danke auch für die Erklärung im letzten Post .
Dank muß Ich mal schauen was Ich nun mache .
Nochmals Vielen Dank und einen schönen Tag
jimParticipant
New
Pardon, ma i codici pubblicati delle strategie sono completi operativi o no?
Entschuldigung, aber sind die veröffentlichten Strategiekodizes voll funktionsfähig oder nicht?
@sent1ment
Poste nur in der Sprache des Forums in dem du postest. Zum Beispiel Englisch nur in englischen Foren und Deutsch nur in deutschen Foren.
Danke 🙂