Dax 30mn – Kama Supertrend Opening
Forums › ProRealTime English forum › ProOrder support › Dax 30mn – Kama Supertrend Opening
- This topic has 17 replies, 7 voices, and was last updated 6 years ago by
BobFlynn.
-
-
11/21/2019 at 9:02 AM #113163
Hello guys,
I’ve been on this forum for a few weeks now, and I’m really grateful to be part of this community. I feel it’s now time for me to contribute as I can.
So I’ve decided to share with you this short idea, basically it takes position only in the first few hours of cash market.
Using SuperTrend and KAMA to filter entries, and trailstop with another (faster) Supertrend.
It is just a draft yet, looking forward to your inputs and ideas on how to make it better.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798// Définition des paramètres du codeDEFPARAM CumulateOrders = False // Cumul des positions désactivé// Annule tous les ordres en attente et ferme toutes les positions à l'heure "FLATAFTER"// DEFPARAM FLATAFTER = 220000// Empêche le système de placer des ordres pour entrer sur le marché ou augmenter la taille d'une position avant l'heure spécifiéenoEntryBeforeTime = 090000timeEnterBefore = time >= noEntryBeforeTime// Empêche le système de placer des ordres pour entrer sur le marché ou augmenter la taille d'une position après l'heure spécifiéenoEntryAfterTime = 113000timeEnterAfter = time < noEntryAfterTimeIF (CurrentTime = 090000) THENOpeningPrice = Open[0]ENDIF/// --- MONEY MANAGEMENT//Capital = 350//Risk = 0.0714//StopLoss = 50 // Could be our variable X//equity = Capital + StrategyProfit//maxrisk = round(equity*Risk)//PositionSize = abs((maxrisk/StopLoss)/PointValue)PositionSize = 1/// ---------------------------------- Indicators ------------------------------------- ///iMACD1850 = MACDline[18,50,9](close)signal1850 = ExponentialAverage[9](iMACD1850)iSuperTrend = SuperTrend[3,17]kama = CALL "KAMA 50"[50, 2, 30]iVolatStop = SuperTrend[2,15]//LongStop = close[1] - (iATR[1] * 2)//ShortStop = close[1] - (iATR[1] * 2)iATR = AverageTrueRange[20](close)multiplicatorATR = 1.2/// ---------------------------------------------------------------------------------- ////// --- LONG ENTRY PRICE DEFBullishOpening = (OpeningPrice > kama) AND (OpeningPrice > iSuperTrend)PriceBelowKamaST = (close < kama) AND (close < iSuperTrend)IF BullishOpening THENLongEntryPrice = OpeningPrice + (multiplicatorATR*iATR)ENDIFIF PriceBelowKamaST THENLongEntryPrice = iSuperTrendENDIF///------------------------------------------------------------------////// --- SHORT ENTRY PRICESPriceAboveKamaST = (close > kama) AND (close > iSuperTrend)BearishOpening = (OpeningPrice < kama) AND (OpeningPrice < iSuperTrend)IF BearishOpening THENShortEntryPrice = OpeningPrice - (multiplicatorATR *iATR)ENDIFIF PriceAboveKamaST THENShortEntryPrice = iSuperTrendENDIF/// -------------------------------- ///OpenLong = (iMACD1850 > signal1850) AND PriceBelowKamaSTOpenShort = (iMACD1850 < signal1850) AND PriceAboveKamaST/// BUYIF OpenLong AND timeEnterBefore AND timeEnterAfter THENBUY PositionSize CONTRACT AT LongEntryPrice STOPlowOpen = low[1]ENDIFIF BullishOpening AND timeEnterBefore AND timeEnterAfter THENBUY PositionSize CONTRACT AT LongEntryPrice STOPlowOpen = low[1]ENDIFSELL AT lowOpen STOPSELL AT iVolatStop STOP/// SELLIF OpenShort AND timeEnterBefore AND timeEnterAfter THENSELLSHORT PositionSize CONTRACT AT ShortEntryPrice STOPhighOpen = high[1]ENDIFIF BearishOpening AND timeEnterBefore AND timeEnterAfter THENSELLSHORT PositionSize CONTRACT AT ShortEntryPrice STOPhighOpen = high[1]ENDIFEXITSHORT AT highOpen STOPEXITSHORT AT iVolatStop STOPSET STOP pLOSS iATR*2.5// TRAILING //////////////////////////////////////////////////////////11/21/2019 at 9:53 AM #113285Hi Bob and thanks a lot for sharing this strategy. In order to complete the review process before sending it into the library, it would be kind of you if you could do some WF testing, is it possible? Thanks again for your contribution to the website which is greatly appreciate! 😉
11/21/2019 at 10:09 AM #11328711/21/2019 at 10:25 AM #113294Is below the Indicator you refer to in your code as KAMA 50 ?
If No, where is KAMA 50 or has my coffee not worked through yet? 🙂
https://www.prorealcode.com/prorealtime-indicators/kaufman-adaptive-moving-average-kama/
11/21/2019 at 10:41 AM #113303Hello Grahal,
Haha actually I just imported to try the code of this topic : https://www.prorealcode.com/topic/kama-200-2/
So I don’t know really …
11/21/2019 at 4:22 PM #11332811/21/2019 at 7:25 PM #11334911/21/2019 at 9:14 PM #113362Hello Roger
Thank you for sharing your trading system. Do you have an explanation why there was movement in the Dax in the gray areas it was not really reflected in the profit? In the areas with the blue line he behaves completely differently?Probacktest 100.00 Einheiten , 2 Positionen , Spread 1
11/21/2019 at 9:31 PM #113365I am on my phone I am not at home tonight but I try to work on it tomorrow.
What bothers me is the % winning because you lose money most of the time so it is mentally hard.
This kind of strategy reminds me the popular Breakout cac40 strat and these strategies need big and proper market move to make money. You typically lose money when the market reverses on the same day.
11/21/2019 at 9:47 PM #11336711/22/2019 at 8:15 AM #113384This kind of strategy reminds me the popular Breakout cac40 strat and these strategies need big and proper market move to make money. You typically lose money when the market reverses on the same day.
Yes Roger, I just learned about London Morning breakout strategy. That’s very similar indeed, what’s funny is that I noticed the pattern myself while live trading. Unfortunately i didn’t find a good way to trail stop the trade… I used MACD crosses, Supertrend, ATR, lowest low… all with no success.
11/22/2019 at 8:32 AM #11338611/22/2019 at 9:02 AM #11339011/22/2019 at 9:14 AM #113391Try these ones, maybe they can help.
https://www.prorealcode.com/blog/learning/trailing-stop-max-favorable-excursion-mfe/and
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647//************************************************************************// TSL trailing stop function//************************************************************************//************************************************************************//trailing stop functiontrailingstart = 50// 20trailing will start @trailinstart points profittrailingstep = 10// 5trailing step to move the "stoploss"//reset the stoploss valueIF NOT ONMARKET THENnewSL=0ENDIF//manage long positionsIF LONGONMARKET THEN//first move (breakeven)IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THENnewSL = tradeprice(1)+trailingstep*pipsizeENDIF//next movesIF newSL>0 AND close-newSL>=trailingstep*pipsize THENnewSL = newSL+trailingstep*pipsizeENDIFENDIF//manage short positionsIF SHORTONMARKET THEN//first move (breakeven)IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THENnewSL = tradeprice(1)-trailingstep*pipsizeENDIF//next movesIF newSL>0 AND newSL-close>=trailingstep*pipsize THENnewSL = newSL-trailingstep*pipsizeENDIFENDIF//stop order to exit the positionsIF newSL>0 THENSELL AT newSL STOPEXITSHORT AT newSL STOPENDIF//************************************************************************11/22/2019 at 11:33 AM #113401 -
AuthorPosts
Find exclusive trading pro-tools on