tonbParticipant
Junior
I am looking for 3 candelstick patern as an indicator for scalping therfore no screener.
Bear candele closes below the opening of candel 1.
Bulle candele closes above te opening of candele 1.
It’s a 2-candle pattern then?
tonbParticipant
Junior
it doesn’t save the attachment.
tonbParticipant
Junior
Bear candele closes below the opening of candel 1.
Candele 1 is an Up candele, candele 2 is an Up candele and then candele 3 closes below the opening of candel 1.=Bear
Bulle candele closes above te opening of candele 1.
Candele 1 is a down candele, candele 2 is down candele and then candele 3 close above te opening of candele 1.= Bull
JSParticipant
Senior
Hi Ton,
You can try this one…
If Close[2]>Open[2] and Close[1]>Open[1] and Close<Open[2] then
Bear=1
Bull=0
ElsIf Close[2]<Open[2] and Close[1]<Open[1] and Close>Open[2] then
Bear=0
Bull=1
EndIf
Return Bull as "Bull" Coloured("Green"), Bear as "Bear" Coloured("Red")
tonbParticipant
Junior
Thank jou, the formula is good, but I would like een signal if the conditions are met. Now i only get a signal when there is a trend reversal.
JSParticipant
Senior
This one is with “arrows” when the condition is true…
(Load indicator on price)
If Close[2]>Open[2] and Close[1]>Open[1] and Close<Open[2] then
Bear=1
Bull=0
ElsIf Close[2]<Open[2] and Close[1]<Open[1] and Close>Open[2] then
Bear=0
Bull=1
EndIf
If Bull=1 and Bear[1]=1 then
DrawArrowUP(BarIndex,Low)Coloured("Green")
ElsIf Bear=1 and Bull[1]=1 then
DrawArrowDown(BarIndex,High)Coloured("Red")
EndIf
Return //Bull as "Bull" Coloured("Green"), Bear as "Bear" Coloured("Red")
@ JS
sorry but i don’t understand why you write this line: If Bull=1 and Bear[1]=1
I think it’s not possible to have bull in the current bar and bear in the previous one.
Hi,
Thanks for the indicator. I am trying to use convert it to a strategy. A position is open at the next candle to the one showing the buy/sell signal. I would like to open the position once the arrow is drawn.
Any clue on how to do write it ?
Thanks
// 3 Candle Pattern
//Strategy
If Close[2]>Open[2] and Close[1]>Open[1] and Close<Open[2] then
Bear=1
Bull=0
ElsIf Close[2]<Open[2] and Close[1]<Open[1] and Close>Open[2] then
Bear=0
Bull=1
EndIf
//Timeframe (1 mn)
If Bull=1 and Bear[1]=1 then
buy 0.5 contract at market
//DrawArrowUP(BarIndex,Low)Coloured("Green")
ElsIf Bear=1 and Bull[1]=1 then
sellshort 0.5 contract at market
//DrawArrowDown(BarIndex,High)Coloured("Red")
EndIf
JSParticipant
Senior
Your strategy code is good, and the order can’t be executed faster than this…
The “Close” of the last bar is decisive so the fastest execution is on the “Open” of the next bar…
Thanks JS.
I also will try to switch timeframe.
Building on the strategy, for each position, I want to set the stop loss at the open value of the previous candle as per the blue marks on the picture. I am sure there is an obvious way to code it but I cant get it right.
// 3 Candle Pattern
//Strategy
If Close[2]>Open[2] and Close[1]>Open[1] and Close<Open[2] then
Bear=1
Bull=0
ElsIf Close[2]<Open[2] and Close[1]<Open[1] and Close>Open[2] then
Bear=0
Bull=1
EndIf
// Stop Loss Management
If onmarket THEN
set stop loss open[tradeindex[1]]
ENDIF
//Timeframe (1 mn)
If Bull=1 and Bear[1]=1 then
buy 0.5 contract at market
//DrawArrowUP(BarIndex,Low)Coloured("Green")
ElsIf Bear=1 and Bull[1]=1 then
sellshort 0.5 contract at market
//DrawArrowDown(BarIndex,High)Coloured("Red")
EndIf