Rank: Newbie
Groups: Registered, Registered Users Joined: 5/9/2013(UTC) Posts: 4
|
I think there must be a better way to code the following but can´t figure out how. The idea is to check several more days wich would make this code a really mess.. bWidth:= (BBandTop(C,20,S,2)-BBandBot(C,20,S,2)); bWidth4:= (BBandTop(Ref(C,-4),20,S,2)-BBandBot(Ref(C,-4),20,S,2)); bWidth5:= (BBandTop(Ref(C,-5),20,S,2)-BBandBot(Ref(C,-5),20,S,2)); bWidth6:= (BBandTop(Ref(C,-6),20,S,2)-BBandBot(Ref(C,-6),20,S,2)); bolTop:= BBandTop(C,20,S,2); bolBot:= BBandBot(C,20,S,2); minBolWidth:= ATR(21)*4; crossTop:= bWidth >= minBolWidth AND Cross(C,bolTop); crossWidth4:= bWidth4 >= minBolWidth AND Ref(Cross(C,bolBot),-4); crossWidth5:= bWidth5 >= minBolWidth AND Ref(Cross(C,bolBot),-5); crossWidth6:= bWidth6 >= minBolWidth AND Ref(Cross(C,bolBot),-6); crossTop AND crossWidth4 OR crossTop AND crossWidth5 OR crossTop AND crossWidth6
|