Positionsgröße in Long und Short
Forums › ProRealTime Deutsch forum › ProOrder Support › Positionsgröße in Long und Short
- This topic has 11 replies, 3 voices, and was last updated 10 hours ago by axmichi.
-
-
04/10/2024 at 8:17 AM #231332
Hallo,
ich verstehe es nicht mehr.
In dem Code soll die Positionsgröße bestimmt werden.
Wenn der Abstand vom Tradeprice zum Stop Loss 1 € ist, dann müssen doch bei einem Risiko von 100 auch 100 Aktion gekauft werden?!
???
Der Stop Loss ist im Code bei Long das tiefste Tief der letzten 5 Kerzen, bei Short ist es das höchste Hoch der letzten 5 Kerzen.
Es wird immer die falsche Anzahl an Aktien gekauft??
IF TradePrice = 0 THEN
PositionSize17 = 1
PositionSize18 = 1
ELSE
PositionSize17 = 100 / c17 //Compute PositionSize
PositionSize18 = 100 / c18 //Compute PositionSize
ENDIF
//————————————————————————————
// Conditions for entering long positions
c1 = (close > high[1])
c2 = ( close > high[2])IF NOT onmarket AND c1 AND c2 THEN
Buy PositionSize17 SHARES AT MARKETSL = Lowest[5](Low)
c17 = close- (Lowest[5](Low))
set stop loss c17Endif
X = 20
if onmarket and BarIndex – TradeIndex = x Then
sell at market
endif
////————————————————————————————
// Conditions for entering short positions
c3 = (close < low[1])
c4 = ( close < low[2])IF NOT onmarket AND c3 AND c4 THEN
sellshort PositionSize18 SHARES AT MARKET
SL1 = highest[5](high)c18 = (highest[5](high))-close
set stop loss SL1Endif
Y = 21
if onmarket and BarIndex – TradeIndex = y Then
exitshort at market
endif
graphonprice Tradeprice – c17 coloured(255,0,0,255)AS “StopLossLong”
graphonprice Tradeprice + c18 coloured(210,0,0,255)AS “StopLossShort”04/10/2024 at 2:41 PM #231356Moin,
wie stellst du sicher das low[5] oder high[5] jeweils über oder unter dem close liegt?
Es könnt auch so kalkuliert werden
set stop price SL (oder SL1)https://www.prorealcode.com/documentation/price/
Gruß
Suffi04/10/2024 at 7:53 PM #23137104/10/2024 at 9:12 PM #231377Der Stop-Loss-KURZ musste korrigiert werden, aber im Großen und Ganzen scheint es mir in Ordnung zu sein.
1234567891011121314151617181920212223242526272829303132333435363738394041//————————————————————————————// Conditions for entering long positionsc1 = (close > high[1])c2 = ( close > high[2])IF NOT onmarket AND c1 AND c2 THENBuy PositionSize17 SHARES AT MARKETSL = Lowest[5](Low)c17 = close - SLset stop loss c17Endif//IF TradePrice = 0 THENPositionSize17 = 1PositionSize18 = 1ELSEPositionSize17 = 100 / c17 //Compute PositionSizePositionSize18 = 100 / c18 //Compute PositionSizeENDIF//X = 20if onmarket and BarIndex - TradeIndex = x Thensell at marketendif////————————————————————————————// Conditions for entering short positionsc3 = (close < low[1])c4 = (close < low[2])IF NOT onmarket AND c3 AND c4 THENsellshort PositionSize18 SHARES AT MARKETSL1 = highest[5](high)c18 = SL1 - closeset stop loss c18EndifY = 21if onmarket and BarIndex - TradeIndex = y Thenexitshort at marketendifgraphonprice Tradeprice - c17 coloured(255,0,0,255)AS "StopLossLong"graphonprice Tradeprice + c18 coloured(210,0,0,255)AS "StopLossShort"04/12/2024 at 8:46 AM #231434Hallo Roberto, können Sie bitte prüfen ob bei Ihnen die Positionsgrößen stimmen, bei mir stimmen die nicht!!??
Wie im Bild ein shorttrade
1 = Abstand von Entry zu Stop loss = 0,34
Positionsice = 100 / 0,34 = 294 Stück
Gekauft wurden aber nur 163 Stück , siehe Bild
Warum??
04/12/2024 at 3:14 PM #231458Du musst es mir erzählen:
- Name des Instruments
- Zeitrahmen verwendet
- eingesetztes Kapital
- atum und Uhrzeit der Betriebseröffnung
04/14/2024 at 5:27 PM #23150404/15/2024 at 7:45 AM #231511Hallo Roberto,
Name Instrument = TSLA
Zeitrahmen = 1 Day
Eingesetztes Kapital = 100 siehe Zeile 16 und 17 im Code
Datum und Uhrzeit der Betriebseröffnung = 27.03.2024 siehe Foto
Abstand Entry zu Stopp Loss 11,37 also 100 / 11,37 = 8,79 im Trade werden aber 5 Stück gekauft
04/15/2024 at 7:52 AM #231513Hi Suffi,
Gruß 🙂
bei Long ist der SL ja das low das tiefste Tief der letzten 5 Kerzen vor dem Trade, dies ist natürlich tiefer als der Einstieg.
Wenn ich dann den Entry preis – dem Low rechne, dann bekomme ich die Differenz im Trade oben 11,… wenn ich dieses Initial-Risiko aufteile auf das riskierte Kapital, im code 100 dann komme ich zur Anzahl der Aktien die gekauft werden sollen.
04/15/2024 at 11:32 AM #23152504/15/2024 at 8:39 PM #23155704/29/2024 at 8:12 AM #232011 -
AuthorPosts
Find exclusive trading pro-tools on