Jerusalem, Israel
Posts: 4 since Mar 2012
Thanks Given: 1
Thanks Received: 0
|
Breaking down head & shoulders or M.
I am new to easylanguage.
How can I write exit long position and entering short when breaking head & shoulders or M?
I started:
inputs: ValueNewLow (7),
Price( Low ), ConsecutiveBarsDown( 5 ) ;
var ay4B4Shortbar(false);
if Price < Price[1] then
Value1 = Value1 + 1 { the pre-declared variable Value1 is used here as a
"counter" variable to count the number of consecutive down bars }
else
Value1 = 0 ;
Day4B4Shortbar = low = lowest (Close,ValueNewLow);
if Day4B4Shortbar and Value1 >= ConsecutiveBarsDown then
begin
Plot1( Low, "ConsecDn" ) ;
Alert ;
end
else
NoPlot( 1 ) ; { remove the marker }
|