DN0853
July 23, 2015, 12:07pm
1
Please help me build the following strategy:
Strategy: Open Range Breakout
Buy:
Set A = High of first 30 minutes of trade
Set B = Low of first 30 minutes of trade
Crossover - Simple Moving Average crossover Set A
Exit, if CLOSE < SET B
Sell:
Set B = Low of first 30 minutes of trade
Crossover - Set B crossover Simple Moving Average
Exit, if CLOSE > SET A
Best regards,
Naveen
As per the above conditon
Buy Script:
CROSSOVER(SMA(CLOSE,14),HHV(30))
Buy Exit:
CLOSE<LLV(30)
Sell Script:
CROSSOVER(LLV(30),SMA(CLOSE,14))
Sell Exit:
CLOSE>HHV(30)
DN0853
July 29, 2015, 2:59pm
4
The script you have provided is not correct and generating no trades.
HHV(30) is not used correctly.
For my strategy, I require HIGH of first 30 Minutes of trade, while HHV(30) will give High of last 30 Bars.
Please review and suggest.
Regards,
Naveen
ak89
July 29, 2015, 7:01pm
5
In pi you cannot use time in algo, One option would be to fire the chart with just one candle (incase of 1 minute chart) and use this code.
If you have such script…pls help me