Current bar pivot

 

I have been trying to figure out a current bar pivot trading system.

The idea is High-Low/2 will give you the center of the bar i.e the bar pivot point. a bit like the bars center of gravity everyone over is buyer and everyone under is a seller this is my very simple way of looking at each bar.

I am of the thinking, that as more people and companies begin to trade FX and technology is allowing that to be possible, in theory there should be an increase in volatility and whipsaws on a daily basis due to diffenaces of opinion on a global basis.all in theory of course.

So in order to use this I have been attempting to buy if the current price is over the pivot and sell if the current price is under the pivot both with TS.

This would only work well on pairs with small spreads.

TP based on my STDEV idea.

https://www.mql5.com/en/forum/179464

https://www.mql5.com/en/forum/179464

 

Why won't this generate a buy signal.

I am using Expert Advisor Builder for MetaTrader 4

as the template.

double Level = (high+low+close)/3;

double TakeProfit = Spread;

double StopLoss = Spread;

int Delta=NormalizeDouble((Bid-Level)*Point,0); // Excess

if (Delta<=0)

double Buy1_1 = Delta;

double Buy1_2 = Level;

double Sell1_1 = Delta;

double Sell1_2 = Level;

------------

if (Buy1_1 > Buy1_2) Order = SIGNAL_BUY;

if (Sell1_1 < Sell1_2) Order = SIGNAL_SELL;

Regards

Reason: