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?
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?
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?
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?
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 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];
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
thanks Mladen, i understand what you mean now. Is there anyway to do a premature next bar, before the next actual candle begins?