Hello,
I have a question. When a position has been executed and then sold again. How can I code the selling rate here so that I can continue working with the selling rate?
Buy with 13500 in the Dax
Sell by 134xx with “SET pTrailing” and i need the course for the next Trade.
Sorry for my English. This ist not so good. I hope your understand me.
Many thanks for your help.
Best regards
Fuchsi
Fuchsilein – Welcome to the forums….. however please follow the few simple forum rules. Your topic is strategy related and not Screener related. I moved your topic to the correct forum.
Post your topic in the correct forum:
_ ProRealTime Platform Support: only platform related issues.
_ ProOrder: only strategy topics.
_ ProBuilder: only indicator topics.
_ ProScreener: only screener topics
_ General Discussion: any other topics.
_ Welcome New Members: for new forum members to introduce themselves.
I do not understand your question. Perhaps you would be better asking it in the German language forum if you think communicating in English might make things more difficult?
Hello,
Thank you for the move in the correct forum.
Best Regards
You may be looking for TradePrice?
TRADEPRICE
Hello,
no this in not mean.
This is a exampel.
//Dow Long - Short
// Es werden keine Daten vor Start des Handelssystems geladen.
// Im Fall eines ersten Starts dieses Handelssystems an einem Nachmittag, wird auf diese
// Weise der nächste Tag abgewartet, um mögliche Kauf- und Verkauf-Order festzulegen.
DEFPARAM PreLoadBars = 0
// Die Position wird um 21 Uhr 58 (lokale Zeitzone) glattgestellt.
DEFPARAM FlatAfter = 205800
// Keine neue Position nach dem Candlestick, der um 21 Uhr 30 schließt.
LimitEntryTime = 203000
// Marktanalyse beginnt mit dem 1 Minuten-Candlestick, der um 9 Uhr 00 eröffnet.
StartTime = 080000
// Feiertage wie 24. und 31. Dezember werden ausgeschlossen.
IF (Month=1 And Day=1) or (Month=5 AND Day=1) OR (Month=12 AND (Day=24 OR Day=25 OR Day=26)) THEN //Day=31 nur im Dax
TradingDay=0
ELSE
TradingDay=1
ENDIF
//--------------------------------------------------
// Die Variablen können je nach Wunsch individuell angepasst werden
PositionSize = 1 //Positionsgröße
AmpiltudeSize = 10 //Abstandsgröße vom Eröffnungskurs
StopOne = 10 //Erster Abstand zum Stop
StopTrailing = 50 //Erster Trainlingsabstand
//--------------------------------------------------
IF TIME=StartTime THEN
StartKurs = Open
ENDIF
IndexStartDay = StartKurs
//--------------------------------------------------
// Diese Variable wird ein einziges Mal vor dem Start des Handelssystems initialisiert.
ONCE StartTradingDay = -1
// Die während des Tages sich verändernden Variablen werden
// beim ersten Balken jeden neuen Börsentages initialisiert.
IF (Time<=StartTime AND StartTradingDay<>0) OR IntradayBarIndex=0 THEN
BuyPosition = 0
SellPosition = 0
StartTradingDay = 0
ELSIF Time>=StartTime AND StartTradingDay=0 AND TradingDay=1 THEN
// Der Index des ersten Balkens des Börsentages wird gespeichert. Eröffnungskurs
StartTradingDay=1
ELSIF StartTradingDay=1 AND Time<=LimitEntryTime THEN
// Eröffnung Kaufen
IF BuyPosition>=0 THEN
IF LongOnMarket THEN
BuyPosition = 1
ELSE
LimitEntryBuy = open[2] < (IndexStartDay+AmpiltudeSize) AND close > (IndexStartDay+AmpiltudeSize)
LimitEntryBuy = close CROSSES OVER (IndexStartDay+AmpiltudeSize)
IF LimitEntryBuy THEN
BUY PositionSize CONTRACT AT MARKET
SET STOP pLOSS StopOne
SET STOP pTRAILING StopTrailing
ENDIF
ENDIF
ENDIF
// Eröffnung Verkaufen
IF SellPosition>=0 THEN
IF ShortOnMarket THEN
SellPosition=1
ELSE
LimitEntryShort = open[2] < (IndexStartDay-AmpiltudeSize) AND close > (IndexStartDay-AmpiltudeSize)
LimitEntryShort = close CROSSES UNDER (IndexStartDay-AmpiltudeSize)
IF LimitEntryShort THEN
SELLSHORT PositionSize CONTRACT AT MARKET
SET STOP pLOSS StopOne
SET STOP pTRAILING StopTrailing
ENDIF
ENDIF
ENDIF
ENDIF
//--------------------------------------------------
//TSL mit kleiner Gewinnschwelle
Breakeven = 15 //Sicherung des Gewinnes ab diesem Zeitpunkt
Pointstokeep = 5 //breakeven-profit (Vorsicht vor dem spread!)
//Stop Order, um die Positionen zu verlassen
IF close > (TRADEPRICE+breakeven) THEN
SELL AT(TRADEPRICE+Pointstokeep) STOP
ENDIF
IF close < (TRADEPRICE-breakeven) THEN
EXITSHORT AT (TRADEPRICE-Pointstokeep) STOP
ENDIF
Now when I sell the Buy or the short I need the actual course for the new started.
Do you unterstand me?