Kleines GAP TRADEN
Forums › ProRealTime Deutsch forum › ProOrder Support › Kleines GAP TRADEN
-
-
10/15/2025 at 1:56 PM #252625
Hallo,
In einem 30 Minuten Chart möchte ich folgende Strategie umsetzen
Entry Regeln
Wenn der Schlusskurs von heute um 09 Uhr zwischen 0,5 % – 1 % höher liegt als das Hoch des Vortages, dann soll um 10 Uhr gekauft werden
Der SL soll bei 1,5 % liegen
Exit Regeln
Liegt der Kurs am übernächsten Tag um 09 Uhr im Gewinn und über dem Supertrend Indikator (3, 10)
Wird der Trade am supertrend getrailt und wird erst geschlossen, wenn der Supertrend gebrochen wird.
oder
Liegt der Kurs am übernächsten Tag um 09 Uhr unter dem Supertrend dann wird der Trade geschlossen
Trademanagement
Schön wäre noch, dass wenn der Trade mit einem CRV von 2:1 im Gewinn ist, soll sich der Supertrend näher an den Kurs ziehen und es soll für den Trailing die Werte Super Trend (2, 8) genommen werden. Sofern das geht
Vielen Dank
10/15/2025 at 3:38 PM #252635123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778// --- System Parameters ---DEFPARAM CumulateOrders = FALSE// --- User-defined variables ---slPercentage = 1.5stFactor1 = 3stPeriod1 = 10stFactor2 = 2stPeriod2 = 8// --- Variable Initialization ---once trailstop = lowonce target2R = high// --- Entry Logic ---IF NOT ONMARKET THEN// Reset the day counter when not in a positiondaysOntrade = 0// Reset the buy signal at the start of each new dayIF IntradayBarIndex = 0 THENbuySignalToday = 0ENDIF// 1. Check the entry condition at 09:00IF opentime = 090000 THENpercDiff = (close / DHigh(1) - 1) * 100IF percDiff >= 0.5 AND percDiff <= 1 THENbuySignalToday = 1ENDIFENDIF// 2. Execute the buy order at 10:00 if the signal was triggeredIF opentime = 100000 AND buySignalToday = 1 THENBUY 1 CONTRACT AT MARKETENDIFENDIF// --- Position and Exit Management ---IF LONGONMARKET THEN // This block runs only once per trade, on the entry bar, to set initial valuesIF LONGONMARKET[1] = 0 THENinitialStopPrice = POSITIONPRICE * (1 - slPercentage / 100)trailStop = initialStopPriceinitialRiskPoints = POSITIONPRICE - initialStopPricetarget2R = POSITIONPRICE + (2 * initialRiskPoints)trailingState = 0// State 0: Initial SL, 1: Trailing ST(3,10), 2: Trailing ST(2,8)ENDIF // Priority check: Switch to aggressive trailing if 2:1 R:R target is hitIF close >= target2R AND trailingState < 2 THENtrailingState = 2 // Switch to aggressive trailingENDIF // Check the "day after next" trailing condition (daysOntrade >= 2) // This is evaluated only once at 09:00 if still in the initial SL state (state 0)IF daysOntrade >= 2 AND opentime = 090000 AND trailingState = 0 THENst1 = Supertrend[stFactor1, stPeriod1]IF POSITIONPERF > 0 AND close > st1 THENtrailingState = 1 // Start trailing with ST(3,10)ELSESELL AT MARKET // Condition not met, close the positionENDIFENDIF// Apply the Stop Loss based on the current stateIF trailingState = 0 THEN// State 0: Initial fixed Stop LossSET STOP PRICE trailStopELSIF trailingState = 1 THEN// State 1: Trailing Stop with Supertrend (3,10)st1 = Supertrend[stFactor1, stPeriod1]trailStop = st1SET STOP PRICE trailStopELSIF trailingState = 2 THEN // State 2: Aggressive Trailing Stop with Supertrend (2,8) after hitting 2R targetst2 = Supertrend[stFactor2, stPeriod2]trailStop = st2SET STOP PRICE trailStopENDIF // Increment the day counter at the start of each new day in the tradeIF IntradayBarIndex = 0 THENdaysOntrade = daysOntrade + 1ENDIFENDIF// --- Chart Visualization ---graphonprice trailStop as "TrailStop" coloured("red")graphonprice target2R as "Target" coloured("green")graph percDiff as "%diff" coloured("red")graph 0.5 as "% min" coloured("blue")graph 1 as "% max" coloured("blue")graph 0 as "zero"1 user thanked author for this post.
10/15/2025 at 5:04 PM #252639 -
AuthorPosts