# Requests & Ideas - page 276 163389

rayphua:
Thanks Mladen, just installed and testing it.

1. Is this a one bar projection, somehow it looks like a two bar projection.

2. I suppose when price changes, projection would also change?

3. Regarding the use of current high and low, instead of just the close, I think projections will almost always be an increase if it is below zero, and a decrease if it is above zero. Is there anyway to avoid using the high and the low?

rayphua

1. it is one bar projection

2. yes, if the price changes the projection changes too

3. it can not be done. Some parts of the calculation of VQ would be a constant 0 if only close price would be used and it would make the projection a constant 0 - hence it would be useless 537

rayphua

1. it is one bar projection

2. yes, if the price changes the projection changes too

3. it can not be done. Some parts of the calculation of VQ would be a constant 0 if only close price would be used and it would make the projection a constant 0 - hence it would be useless

I think I have a solution. What if we fix the projected candle's open/close/high/low price as the current candle's price? 163389

rayphua:
I think I have a solution. What if we fix the projected candle's open/close/high/low price as the current candle's price?

rayphua

It is using current open,close,high/low in calculation now for the projection 537

rayphua It is using current open,close,high/low in calculation now for the projection

Yes I know. Instead, can we use the current candle's close = projected candle's current open/close/high/low, to calculate? 163389

rayphua:
Yes I know. Instead, can we use the current candle's close = projected candle's current open/close/high/low, to calculate?

rayphua

As I alerady explained : no it can not be done. It is the nature of how VQ is calculated and if you use only one price (close) in the calculation the result will be a constant 0 537

rayphua As I alerady explained : no it can not be done. It is the nature of how VQ is calculated and if you use only one price (close) in the calculation the result will be a constant 0

My bad. Okay, then can we use current candle's close = project candle's open and close. And projected candle's high = current candle close + 1 pip, and projected candle's low = current candle's close - 1 pip.

Would that not be possible? 163389

rayphua:
My bad. Okay, then can we use current candle's close = project candle's open and close. And projected candle's high = current candle close + 1 pip, and projected candle's low = current candle's close - 1 pip. Would that not be possible?

rayphua

This is the way how VW is calculated. Please take a look at it in try to imagine what will happen if you replace any of the prices with other

double cHigh = iMA(NULL,0,PriceSmoothing,0,PriceSmoothingMethod,PRICE_HIGH ,MathMax(i-1,0));

double cLow = iMA(NULL,0,PriceSmoothing,0,PriceSmoothingMethod,PRICE_LOW ,MathMax(i-1,0));

double cOpen = iMA(NULL,0,PriceSmoothing,0,PriceSmoothingMethod,PRICE_OPEN ,MathMax(i-1,0));

double cClose = iMA(NULL,0,PriceSmoothing,0,PriceSmoothingMethod,PRICE_CLOSE,MathMax(i-1,0));

double pClose = iMA(NULL,0,PriceSmoothing,0,PriceSmoothingMethod,PRICE_CLOSE,i);

double trueRange = MathMax(cHigh,pClose)-MathMin(cLow,pClose);

double range = cHigh-cLow;

if (range != 0 && trueRange!=0)

double vqi = ((cClose-pClose)/trueRange + (cClose-cOpen)/range)*0.5;

else vqi = Vqi[r-1]; 100

Hi Mr Tools or Mladen, can you add Take Profit and Stop Loss parameters to this EA please? This one seems very interesting and might be worth further developing. I noticed that it does close trades at the right time to minimize loss so if you can keep that feature independent from a stop loss field, it would be wonderful (say if stop loss=0, nothing happens and it continues to work as before).

It also takes profit but sometimes too late and misses the mark so a TP field would be the most important thing. Thanks.

Files: 163389

Hi Mr Tools or Mladen, can you add Take Profit and Stop Loss parameters to this EA please? This one seems very interesting and might be worth further developing. I noticed that it does close trades at the right time to minimize loss so if you can keep that feature independent from a stop loss field, it would be wonderful (say if stop loss=0, nothing happens and it continues to work as before). It also takes profit but sometimes too late and misses the mark so a TP field would be the most important thing. Thanks.

Here you go. Stop loss and take profit added. Option for ecn broker added too. Also one more option : oldLotSize. If set to true it will calculate lot sizes as before (but then it can run out f money very fast as far as I have noticed). Try out both types and you will see how it differs

Files: 537

rayphua

This is the way how VW is calculated. Please take a look at it in try to imagine what will happen if you replace any of the prices with other

double cHigh = iMA(NULL,0,PriceSmoothing,0,PriceSmoothingMethod,PRICE_HIGH ,MathMax(i-1,0));

double cLow = iMA(NULL,0,PriceSmoothing,0,PriceSmoothingMethod,PRICE_LOW ,MathMax(i-1,0));

double cOpen = iMA(NULL,0,PriceSmoothing,0,PriceSmoothingMethod,PRICE_OPEN ,MathMax(i-1,0));

double cClose = iMA(NULL,0,PriceSmoothing,0,PriceSmoothingMethod,PRICE_CLOSE,MathMax(i-1,0));

double pClose = iMA(NULL,0,PriceSmoothing,0,PriceSmoothingMethod,PRICE_CLOSE,i);

double trueRange = MathMax(cHigh,pClose)-MathMin(cLow,pClose);

double range = cHigh-cLow;

if (range != 0 && trueRange!=0)

double vqi = ((cClose-pClose)/trueRange + (cClose-cOpen)/range)*0.5;

else vqi = Vqi[r-1];

thanks Mladen, i understand what you mean now. Is there anyway to do a premature next bar, before the next actual candle begins?