Replies

sim_trader
01 Dec 2015, 19:12

Thanks

Hi Spotware,

Thanks loads for your help with the Market Depth. In terms of the second issue, I am trying to collect the bid and ask into an array at runtime. I will keep reading about arrays and find out where I have messed up. It is the only think keeping me from going live at present.  I will keep reading.

Thanks again,

Cheers, Andre

 


@sim_trader

sim_trader
21 Nov 2015, 19:49

Thanks

Hi Paul,

Thanks again, I really appreciate your time.

I cannot believe however efficient that is. One line to find, count, and check the condition.

It compiles perfectly.

Wonderful, thanks so much. I am certainly going to do more reading. I had never heard of LINQ and LAMDA.

Thanks again for your time !

Cheers, Andre


@sim_trader

sim_trader
17 Nov 2015, 19:35

Thanks

Hi Paul,

Thanks so so much. That was probably the single most useful reply I have ever had on any forum. I really appreciate your time.

I downloaded visual studio. It located the error. From that I work out it was poorly placed brackets around some " || " statements which was calling the placestoporder when it should not have been.

Thanks so so much. I would never have worked that out without your help.

Cheers, Sim


@sim_trader

sim_trader
10 Sep 2013, 21:22

RE: RE:

cAlgo_Fanatic said:

sim_trader said:

Dear Forum,

Sorry for the really simple question. I have been reading for 3 hrs and cannot work it out.

I want to get the value of the zigzag indicator for X bars ago, where X is an external integer.

I thought I could change this line

double lastValue = _zigZag.Result.LastValue;

and use this instead

 double lastValue = _zigZag.Result[backstep_bars];
        

backstep_bars is a declared external integer.

While it compiles it does not seem to return the correct value. I would have assumed that if I set "backstep_bars" to 0 or 1
it would be the same value as _zigZag.Result.LastValue; but it does not ?

 

What am I missing ? I have been trading in MQL4 for sometime but have no experience in C#. But will to learn.

 

Thanks for your helps, Cheers, Sim

Please note that the ZigZag is not simple indicator. That is, you can not read intermediate values (so you need to interpolate).

Hi CAlgo,

Thanks so much for your help. I am not 100% sure what you mean. In MT4 I used to cycle through the bars and check if the ZZ indicator has a value. Once a value is found it return the value as the local extreme.

The code would be

 

double GetExtremumZZPrice(int ne=0) {
   double zz;   
   int    i, k=iBars(Symbol(), 0), ke=0;
   for (i=1; i<k; i++) {
      zz=iCustom(Symbol(),0, "ZigZag", ExtDepth,ExtDeviation,ExtBackstep,0,i);
      if (zz!=0) {
         ke++;
         if (ke>ne) return(zz);     
      }   
   }   
   return(0);
}

Is there anyway you could help me convert this function to return most recent extreme price. I am really struggling with it in CAlgo.

 

Thanks so so much, Cheers

 

Andre


@sim_trader

sim_trader
10 Sep 2013, 15:56

RE: RE:

adaled said:

sim_trader said:

I want to get the value of the zigzag indicator for X bars ago, where X is an external integer.

var lastValue = _zigZag.Result.Result[index - backstep_bars];
 

Hi Adaled,

 

Thanks so much !!!!, Cheers, Sim


@sim_trader