My strategy is which i wants amibroker afl code can any one creat this
prev high - prev low = difference1
difference*25% = difference2
prev close + difference2 = buy price
prev close - difference2 = sell price
condition if current market price is above buy price then buy target is 1% and stoploss is .5%
if current market price is less then sell price then sell target 1% and stoploss is .5%
example
prev high 4750
prev low 4600
prev close 4650
current market price is 4665
4750-4600= 50
50*25% = 12.5
buy price is 4650 + 12.5 = 4662.5
sell price is 4650-12.5= 4637.5
prev high - prev low = difference1
difference*25% = difference2
prev close + difference2 = buy price
prev close - difference2 = sell price
condition if current market price is above buy price then buy target is 1% and stoploss is .5%
if current market price is less then sell price then sell target 1% and stoploss is .5%
example
prev high 4750
prev low 4600
prev close 4650
current market price is 4665
4750-4600= 50
50*25% = 12.5
buy price is 4650 + 12.5 = 4662.5
sell price is 4650-12.5= 4637.5