TradingView
AlistarElvis
٢٦ نيسان أبريل ٢٠١٥ ١٥:٢٩

Naked Forex Trading Strategy 

Australian Dollar/U.S. DollarFXCM

الوصف

Based on "How Naked Trading Works" video by Walter Peters: youtu.be/t-pD3fap25c?t=1m21s. I don't know this person and I am in no way affiliated with him. I just found his video interesting enough to make this into a script.

Rules as described by Walter in his video:

1. if current candle makes a higher high than the previous one
2. and is a bearish engulfing candle
3. and has room to the left
4. and is the largest candle (high - low) compared to the last 7-10 previous ones

Then open trade on the next candle once it breaks bearish engulfing candle's low and take profit close above previous support. Stop loss goes a few pips above bearish engulfing candle high

Do the opposite on a bullish engulfing candle signal.

Works best on 1H, 4H and 1D timeframes.

I haven't done any extensive backtesting on this, but it looks like it gives pretty good signals:
التعليقات
cheeky
Right now it seems to only give Bearish signals.
I think you are missing a line around line 32 - You need to define largestCandle for the Bullish signal.
ealis2001
@cheeky, largest candle is the same for both Bullish and Bearish, no need to define it again. It's the largest in terms of the difference between the high and the low of the candle.
ealis2001
Hey, everyone! I don't have access to my old account, but I think this is the PineScript v5 version of the script:

//@version=5
//Based on "How Naked Trading Works" video by Walter Peters: youtu.be/t-pD3fap25c?t=1m21s
indicator(title = "Naked Forex Trading Strategy", overlay = true)

roomToTheLeftPeriod = input(7, title="Room To Left Interval Check")
largestCandlePeriod = input(7, title="Largest Of Last X Candles")
//1. if current candle makes a higher high
//2. and is a bearish engulfing candle
//3. and has room to the left
//4. and is the largest candle (high - low) compared to the last 7 previous ones

//Open trade on the next candle once it breaks bearish engulfing candle's low and take profit close above previous support
//Stop loss goes a few pips above signal candle high

higherHigh = high > high[1] //step 1
bearishEngulfing = close[1] > open[1] and open > close and open >= close[1] and open[1] >= close and open - close > close[1] - open[1] //step 2
roomToTheLeftRising = ta.rising(high, roomToTheLeftPeriod) //step 3
largestCandle = math.max(high - low, largestCandlePeriod) //step 4
barcolor(higherHigh and bearishEngulfing and roomToTheLeftRising and largestCandle ? color.yellow : na)

//1. if current candle makes a lower low
//2. and is a bullish engulfing candle
//3. and has room to the left
//4. and is the largest candle (high - low) compared to the last 7 previous ones

//Open trade on the next candle once it breaks bulish engulfing candle's high and take profit close below previous resistance
//Stop loss goes a few pips below signal candle low

lowerLow = low < low[1]
bullishEngulfing = open[1] > close[1] and close > open and close >= open[1] and close[1] >= open and close - open and open[1] - close[1]
roomToTheLeftFalling = ta.falling(low, roomToTheLeftPeriod)
barcolor(lowerLow and bullishEngulfing and roomToTheLeftFalling and largestCandle ? color.white : na)
Siiigns
@ealis2001, Do You mind publishing this I dont know how to add this.
wayhooah
seems like step4 should be like this?
largestCandle = high - low > highest(high - low, largestCandlePeriod)[1] //step 4
ealis2001
@wayhooah, I haven't checked this logic, but I don't get any signals if I make this change
elbistan
I have added this indicator but it does not show any bar colour signals. Added the correction mentioned by @wayhooah but still the same.
ealis2001
@elbistan, it doesn't give a lot of signals. try changing timeframe and going back in the history, you should see yellow and white colored bars. Change the colors if the defaults are hard to see.
LazyBear
Good job.
AlistarElvis
Thanks! This is big, coming from you, one of the PineScript experts ;-)
المزيد