Hi,
I am writing my first AFL system and as such encountered few
stumbling blocks. If someone can help to clear my roadblocks I will
be very grateful.
I have lines of code -
// here I am trying to find the how many bars I am in trade
// I can only be in long or short at one time.
barsSinceEntry = Min(BarsSince(Buy),BarsSince(Short));
if (barsSinceEntry == nBarExit){
// other code here
}
It gives me an error saying -
Condition in IF, WHILE, FOR statements has to be Numeric or Boolean
type. You can not use array here, please use [] (array subscript
operator) to access array elements
I tried using barsSinceEntry[0]. It passes syntax but there isnt any
value in barsSinceEntry[0].
Please help.
vishal