Hi, i am not able to code the following strategy:
If ADX < 25 during 24 candles, then
maximun = highest bollingerup during those 24 candles
minimun = lowest bollingerdown during those 24 candles
Set buy stop order at maximun
Set sellshort order at minimun
Thank you very much
Not tested:
Once BB = 20
Once p = 24
MaxbbUP = highest[p](BollingerUp[BB](close))
MinbbDN = lowest[p](BollingerDown[BB](close))
MyAdx = (summation[p](Adx[14] < 25) = p)
If MyAdx then
Buy 1 contract at MaxbbUP Stop
Sellshort 1 contract at MinbbDN Stop
Endif