//Assigning Candlestick Formations variables: BodyHi( 0 ), BodyLo( 0 ), Body( 0 ); //Assigning qualifications for preliminary variables BodyHi = MaxList( Close, Open ) ; BodyLo = MinList( Close, Open ) ; Body = (BodyHi - BodyLo); //Declaring different candlesticks variables: Morning.Star(FALSE), Evening.Star(FALSE); Evening.Star = ( Close[2] > BodyHi[3] ) and {..First Close above Previous Body's High} ( Body[2] > Body[3] ) and {..First Body is Larger than Previous Body} ( Low[1] > (BodyLo[2] + .5*Body[2]) ) and {..Low of Star Stays above first body's midpoint} ( Close[1] > BodyHi[2] ) and {..Close of star above first body high} ( Body[1] < Body[2] ) and ( Body[1] < Body ) and {..Body of star smaller than bodies of first and last candles} ( Close < ( BodyHi[2] - .5*Body[2] ) ); {..Close of final candle is below midpoint of first body} Morning.Star = ( Close[2] < BodyLo[3] ) and {..Close of first candle below low of previous bar} ( Body[2] > Body[3] ) and {..First body larger than the previous one} ( Body[1] < Body[2]) and ( Body[1] < Body ) and {..Body of star smaller than bodies of first and last candles} ( Close[1] < (BodyLo[2] + Body[2]*.5) ) and {..Close of the star candle is below midpoint of first body} ( Close > (BodyLo[2] + Body[2]*.5 ) ); {..Close of final candle is above midpoint if first body} ///// Coding actual buy/sell signals ///Leaving Stop Loss Option Available inputs: Stop.Loss(5000), Profit.target(20000); SetStopLoss(Stop.Loss); SetProfitTarget(Profit.Target); //////////Coding Entries if Morning.Star = TRUE //Morning Star Formation then Buy ("Morning.Star") 1 contracts next bar at market; if Evening.Star //Evening Star Formation then SellShort ("Evening.Star") 1 contracts next bar at market;