Forum

Loop to find daily price range of last x day

Hi, how can I loop through days to find minvalue and max value, it would be interesting to write to file the following informations: <Day number>,<session>,<MinValInRange>,<MaxValInRange>,<NumPipsInRange>,<VarPercent> Variables: string Fname = Symbol ()+ ".csv" ; //filename with current symbol The

How to code ma of atr?

Hi, I need to code for my system: - atr periods 7 - exponential ma of atr at 35 periods I think that it would be a good indicator for scalping strategy. Thx for your attention

Squeeze function

Hi, i want to calculate the average of bb bands difference (Bandhigh-BandLow) for a variable set of bars. If last band difference (0) is < than the average, we have a squeeze. I have done the following code but I have errors: int IsSqueeze(){ double lastvalue= 0 ,sum= 0 ,bbaverage= 0 ; int