Momentum strategy by Kathy Lien
Forums › ProRealTime English forum › ProOrder support › Momentum strategy by Kathy Lien
- This topic has 15 replies, 4 voices, and was last updated 3 years ago by
phanz.
-
-
08/09/2021 at 7:50 AM #174956
Hi all, I am sure some of you might heard of the folks from BK Forex Kathy Lien. In her book “High Probability Trading Setups for the Currency Market” there is this interesting short-term momentum strategy which is as follow:
Rules for Five-Minute momentum Trade (using EMA20 and MACD(12,26,9)
Long Trade
1) Look for currency pair to be trading below the 20-period EMA and MACD to be negative
2) Wait for price to cross above the 20-period EMA, make sure that MACD is either in the process of crossing from negative to positive or have crossed into positive territory no longer than 5 bars ago
3) Go long 10 pips above the 20-period EMA
4) Place stop 20 pips below 20-period EMA5) Sell half of position at entry plus amount risked, move stop on second half to breakeven
6) Trail stop by higher of breakeven or 20-period EMA minus 15 pipsIt looks simple but I got lost on step 3 as the strategy requires long entry as soon as the price cross above the EMA by 10 pips without waiting for the candle to finish forming. If anyone able to code this, will appreciate if you can share the codes here. Thank you and have a great day ahead.
08/09/2021 at 9:07 AM #174957You have to resort to a very low TF (even 1 sec) to check the crossing and use the setup TF with default, instead of UpdateOnClose.
1 user thanked author for this post.
08/09/2021 at 9:21 AM #17495808/23/2021 at 7:07 PM #17602208/23/2021 at 8:41 PM #17602908/24/2021 at 2:48 PM #17609208/24/2021 at 3:37 PM #176103I’ll make it asap.
08/24/2021 at 4:41 PM #176115What does “Sell half of position at entry plus amount risked” mean?
How can half position be sold at entry?
What risk are you talking about?
08/24/2021 at 6:50 PM #176125Hi Roberto,
For example you buy a stock, 10 shares at $100, and have committed $20 amount to risk. Thus your initial SL at entry is $80. When you the price is in the money and gone up from $100 to $120, you sell 5 shares, locking in some profit X amount. After that you move your SL at $80 (which is for 10 shares initially) to new SL leve at $100 for the balance 5 shares. Effectively moving your stop loss to your entry price. Thus, if prices moves beyond $120, you gained more. If price move back down to $100 again you are out at your entry price , and overall you are flat.
08/24/2021 at 6:52 PM #17612608/25/2021 at 11:54 AM #176190There you go:
12345678910111213141516171819202122232425262728293031323334353637383940414243DEFPARAM CumulateOrders = FalseOffset = 10 * PipSizeDistance = 6 * PipSizeMySL = 20 * PipSizeLotSize = 10SellHalf = 20 * PipSizeEma20 = average[20,1](close)MyMACD = Macd[12,26,9](close)L1 = close CROSSES OVER Ema20L2 = summation[5](MyMacd CROSSES OVER 0)Lcond = L1 AND L2 AND Not OnMarketIF Lcond THENEntry = Ema20 + OffsetIF close > (Entry + Distance) THENBUY LotSize Contract AT Entry LIMITELSIF close < (Entry - Distance) THENBUY LotSize Contract AT Entry STOPELSEBUY LotSize Contract AT Market //comment out this line to not enter AT MARKETENDIFSET STOP LOSS MySLSET TARGET PROFIT MySL * 3 //comment out this line not to set a TPENDIF//Gain = PositionPerf * PositionPrice / PipSizeIF LongOnMarket AND abs(CountOfPosition) = LotSize THENIF Gain >= SellHalf THENStopLevel = PositionPriceSELL (LotSize / 2) Contract AT MarketENDIFENDIF//IF Not OnMarket THENStopLevel = 0ELSIF StopLevel > 0 THENSELL AT StopLevel STOPENDIFgraph Gain coloured(0,0,255,255)graph abs(CountOfPosition)graphonprice StopLevel coloured(255,0,0,255) AS "BreakEven"graphonprice PositionPrice coloured(0,128,0,255) AS "Entry Price"graphonprice PositionPrice - MySL coloured(0,0,255,255) AS "SL"graphonprice PositionPrice + SellHalf AS "SellHALF"I added:
- Distance to comply with the broker’s requirements (set it to 0 to disable it)
- TP (comment out that line to disable it)
You can comment out the line to enter at MARKET when there’s not enough distance to place a pending order. In such a case you will get fewer trades, only those within the pending order limits.
4 users thanked author for this post.
08/25/2021 at 3:00 PM #17621408/25/2021 at 3:43 PM #176222Hi Roberto, can you pls explain what summation[5](MyMacd CROSSES OVER 0) mean? Does it mean:
(MyMacd[0] CROSSES Over 0) OR (MyMacd[1] CROSSES Over 0) OR (MyMacd[2] CROSSES Over 0) OR (MyMacd[4] CROSSES Over 0) OR (MyMacd[5] CROSSES Over 0) ?
Thank you in advance.
08/25/2021 at 4:25 PM #176224Yes, it’s (MyMacd[0] CROSSES Over 0) OR (MyMacd[1] CROSSES Over 0) OR (MyMacd[2] CROSSES Over 0) OR (MyMacd[3] CROSSES Over 0) OR (MyMacd[4] CROSSES Over 0).
It makes a sum of the number of times a MACD crossover occurs in the last 5 bars (0 to 4). The returned value is true whenever it’s different from 0.
08/25/2021 at 4:27 PM #176225Or does it mean:
(myMaCD crosses over 0) OR ((myMACD[1] crosses over 0) AND myMACD>0) OR ((myMACD[2] crosses over 0) AND myMACD[1]>0 AND myMACD>0) OR ((myMACD[3] crosses over 0) AND myMACD[2]>0 AND myMACD[1]>0 AND myMACD>0) OR ((myMACD[4] crosses over 0) AND myMACD[3]>0 AND myMACD[2]>0 AND myMACD[1]>0 AND myMACD>0) OR ((myMACD[5] crosses over 0) AND myMACD[4]>0 AND myMACD[3]>0 AND myMACD[2]>0 AND myMACD[1]>0 AND myMACD>0)
-
AuthorPosts
Find exclusive trading pro-tools on