Wow, there are no spacing in making posts .... sorry for the jumbled looking post !!!!!

**no0cool:**

Wow, there are no spacing in making posts .... sorry for the jumbled looking post !!!!!

When you post code in as a text, use the php control for that (the one pointed to at the picture). Then it will loo OK

Greetings all, So I have in active use the indicator (called CFP). I am trying to read the mq4 file and understand how it works, but dont get it once it gets to "subroutine". Can anyone who understands mq4 programming decipher this for me? What I have so far is this: For example, GBPCHF will do this first: (GBPUSD_somemovingaverage * USDCHF_somemovingaverage) / (GBPUSD_mvgaverage * USDCHF_mvgaverage) - 1 then..... what? (this is where I get tripped up on the subroutine Let me know if you need more info... I can just post the subroutine here actually, instead of attach the file but let me know if you want the whole mq4. Thanks. -------------------------- *here is the first equation of movingaverages divided by other moving averages I stated earlier in this post* then.... //+------------------------------------------------------------------+ //| Subroutine | //+------------------------------------------------------------------+ double ma(string sym, int per, int Mode, int Price, int i) { double res = 0; int k = 1; int ma_shift = 0; int tf = 0; switch(Period()) { case 1: res += iMA(sym, tf, per*k, ma_shift, Mode, Price,i); k += 5; case 5: res += iMA(sym, tf, per*k, ma_shift, Mode, Price,i); k += 3; case 15: res += iMA(sym, tf, per*k, ma_shift, Mode, Price,i); k += 2; case 30: res += iMA(sym, tf, per*k, ma_shift, Mode, Price,i); k += 2; case 60: res += iMA(sym, tf, per*k, ma_shift, Mode, Price,i); k += 4; case 240: res += iMA(sym, tf, per*k, ma_shift, Mode, Price,i); k += 6; case 1440: res += iMA(sym, tf, per*k, ma_shift, Mode, Price,i); k += 4; case 10080: res += iMA(sym, tf, per*k, ma_shift, Mode, Price,i); k += 4; case 43200: res += iMA(sym, tf, per*k, ma_shift, Mode, Price,i);