TREND BREAKOUT SYSTEM

Hi Darren,
Please convert the script of Metastock Trend breakout system .
For buy, (Ref(C,-1)>Ref(Mov(C,13,S),-1) AND<br /> (Ref(C,-1)<Ref(C,-2))) AND <br /> (H>O+((Ref(H,-1)-Ref(L,-1)).55))
For sell (Ref(C,-1)<Ref(Mov(C,13,S),-1)) AND<br /> (Ref(C,-1)>Ref(C,-2)) AND <br /> (L<O+((Ref(H,-1)-Ref(L,-1))
.55))
thanks .

Thanks Mohd but I’m not familiar with the Metastock language so I’m not sure what that formula is doing. If you can provide a description of exactly what the system is we can give you a price quote on converting it to Optuma (provided the formula is in the public domain and not proprietary).

Thanks Darren for reply here is the system -For Buy -If prices are above the 13 sma and today's close is lower than yesterdays close, then if prices move up 55% of today's range from tomorrows opening price , we buy with stoploss set at the opening price for sell reverse.

For Buy,

1, Price need to be above 13SMA.

2, Today's close<Yesterdays close

3, Range=Yesterdays high-yesterdays low

4, Breakout filter=55% of Range

5, Entry price =Open of today+Breakout Filter

For Sell ,

1, Price need to be below 13SMA

2, Todays close>Yesterdays close

3, Range=Yesterdays high-yesterdays low

4, Breakout filter=55% of Range

5, Entry price =Open of today-Breakout Filter

 

Hi Mohd.

See below for buys:

  1. Price need to be above 13SMA.

CLOSE()>MA(BARS=13, CALC=Close)

  1. Today’s close<Yesterdays close

CLOSE() IsDown

  1. Range=Yesterdays high-yesterdays low

HIGH(1) - LOW(1)

  1. Breakout filter=55% of Range

BF = (HIGH(1) - LOW(1)) * 0.55

  1. Entry price =Open of today+Breakout Filter

OPEN() + BF

For sells use the opposite. For an introductory course in scripting sign in here: https://learn.optuma.com/scripting-courses/

Hi David ,

Thanks for script but i am facing problem script is below

CLOSE(OFFSET=-1)>MA(BARS=13, CALC=Close) and CLOSE() < OPEN(OFFSET=-1) and BF = (HIGH(OFFSET=-1) – LOW(OFFSET=-1)) * 0.55 and OPEN() + BF

script not work on scan

 

Hi Mohd,

Variables (ie BF) has to be at the beginning of the formula, and the offsets should be 1 not -1. Also you need a true / false condition for a scan for it to find results, as OPEN() + BF is just a value, eg close greater than Open + BF?

BF = (HIGH(1)-LOW(1)) * 0.55;

(CLOSE(1)>MA(BARS=13, CALC=Close)) and

(CLOSE() < OPEN(1)) and

(CLOSE() > (OPEN() + BF))

 

Hi David ,

Thanks for the correction of script and the way of explaining it is really appreciated. One more script i try the criteria is below

1, Close is above linear regression trend line 2, linear regression trend line slop is negative or linear regression trend line slop is just became negative 3, Close and cross is up above linear regression trend line

CLOSE() > LRSLOPE(BARS=14) and LRSLOPE(BARS=14) < 0 and CLOSE() CrossesAbove LRSLOPE(BARS=14) .

I s it wright or not because i have not found any result

Hi Mohd,

LRSLOPE() is an indicator below the price chart, whereas CLOSE() is the value of the price chart, so CLOSE() > LRSLOPE(BARS=14) will never occur unless the two values are coincidentally the same.

Try the following instead, which shows when the slope crosses above zero, matching the indicator underneath:

LRSLOPE(BARS=14) CrossesAbove 0

seen here in green (the red Show Bar lines are LRSLOPE(BARS=14) CrossesBelow 0)

Capture

Hi David ,

Thanks for the reply.

Sir a script of candlestick ,body of candlestick more than 50% and close position is up for green down for red, and body of candlesticks less than 50% color is blue irrespective of close position.

Hi Mohd,

Set the green custom colour option for when the body of candlestick is more than 50% of the range and close position is up:

// get the range of the bar
r1 = HIGH()-LOW();
// get the body value
b1 = ABS(close()-OPEN());
// is body > 50% of range?
v1 = b1 / r1 > 0.5;
//true and close is up
v1 and CLOSE() IsUp

And red for when close is down:

// get the range of the bar
r1 = HIGH()-LOW();
// get the body value
b1 = ABS(close()-OPEN());
// is body > 50% of range?
v1 = b1 / r1 > 0.5;
//true and close is down
v1 and CLOSE() IsDown

When neither of the above is true set the All Scripts colour option to blue:

Capture

Capture

Hi David ,

Thanks for support.

Hi David ,

Thanks for support.