Fibonacci expert advisor question

Back to topics list To post a new topic, please log in or register
avatar
5
Evilynn 2015.09.09 23:12
 

Hey there,

I'm currently working on an expert advisor that uses fibonacci levels. This way I can backtest those levels. I'm using an indicator by deVries (included below) to try and get the last high and low of the ZigZag indicator. 

This is what I'm trying... However, it doesn't work.

Could anybody help me out? I have limited programming knowledge, but I'm trying to improve. 

   double swinghigh;
   double swinglow;
   
   double lvl00;
   double lvl23;
   double lvl38;
   double lvl50;
   double lvl61;
   double lvl100;
   
   swinghigh = iCustom(Symbol(),0, "Zigzag_with_line_at_lows_and_line_at_highs",ExtDepth,ExtDeviation,ExtBackstep,3,0);
   swinglow = iCustom(Symbol(),0,"Zigzag_with_line_at_lows_and_line_at_highs",ExtDepth,ExtDeviation,ExtBackstep,4,0);

   lvl00=swinghigh;
   lvl23=swinghigh-(swinghigh-swinglow)*0.236;
   lvl38=swinghigh-(swinghigh-swinglow)*0.382;
   lvl50=swinghigh-(swinghigh-swinglow)*0.500;
   lvl61=swinghigh-(swinghigh-swinglow)*0.618;
   lvl100=swinglow;

 

Attached files:
  zigzag_with_line_at_lows_and_line_at_highs.mq4  (7.66 KB)
avatar
49
gadget 2015.09.11 00:05 #
 
Perhaps if you detail a bit what you actually mean by "it doesn't work" ?
Back to topics list  

To add comments, please log in or register