So, the primary exit was about the pro volume candle’s high, and once this condition was met, the secondary exit at the 120-sample BB. Both highlighted with an orange marker.

Now, let’s figure out some filters for the parabolic move in real time.


///parabolic break up
if ((High[i+3]>High[i+4] || High[i+4]>High[i+5])
&& Close[i+3]>iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_UPPER,i+3)
&& High[i+1]-Low[i+1]<900*Point
&& (High[i+2]-Low[i+2]>400*Point || (Close[i+4]>iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_UPPER,i+4) && Close[i+5]>iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_UPPER,i+5)))
&& High[i+2]<High[i+3] && Close[i+2]<iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_UPPER,i+2)
&& Close[i+1]>iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_UPPER,i+1) && High[i+1]==iHigh(symbol,0,iHighest(symbol,0,MODE_HIGH,4,i+1))
&& High[i+1]>iBands(symbol,0,120,2,0,PRICE_MEDIAN,MODE_UPPER,i+1)
)
{
ObjectCreate("Bitera"+IntegerToString(i), OBJ_TEXT, 0, Time[i+12], High[i+1]+50*Point);
ObjectSetText("Bitera"+IntegerToString(i), "PARABOLIC MOVE!!! "+DoubleToStr(NormalizeDouble(Close[i+1],4),4) , 21, "Impact", Navy);
}
///parabolic break down
if ((Low[i+3]<Low[i+4] || Low[i+4]<Low[i+5])
&& Close[i+3]<iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_LOWER,i+3)
&& High[i+1]-Low[i+1]<900*Point
&& (High[i+3]-Low[i+3]>400*Point || (Close[i+4]<iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_LOWER,i+4) && Close[i+5]<iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_LOWER,i+5)))
&& Low[i+2]>Low[i+3] && Close[i+2]>iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_LOWER,i+2)
&& Close[i+1]<iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_LOWER,i+1)+20*Point
&& Low[i+1]<=iLow(symbol,0,iLowest(symbol,0,MODE_LOW,4,i+1))+20*Point
&& Low[i+1]<iBands(symbol,0,120,2,0,PRICE_MEDIAN,MODE_LOWER,i+1)
)
{
ObjectCreate("Bitera"+IntegerToString(i), OBJ_TEXT, 0, Time[i+12], Low[i+1]-30*Point);
ObjectSetText("Bitera"+IntegerToString(i), "PARABOLIC MOVE!!! "+DoubleToStr(NormalizeDouble(Close[i+1],4),4) , 21, "Impact", Navy);
}
One common denominator is that things can go awry beyond the 120-sample BB. The exit condition would be an FFF++ distance (end of the Pendulum) unless the price is already outside of it. The first example was something that went outside and never cared to consolidate, so I had to find usable conditions with an unknown playfield.
Let’s write an overhedger that would put you in a 20% extra directional holding even if you are asleep.
// Parabolic Overhedger by Macdulio
#include <stdlib.mqh>
extern double Equity = 400;
extern int magic_number = 98;
extern int magic_number2 = 99;
extern double Ratio = .6;
extern double overhedge = 120;
extern double MarginCallPercentage = 100;
extern double FSize=32;
#property copyright "by Macdulio in 2025"
#property link "https://forexfore.blog"
#property description "Parabolic Overhedger"
int profits;
double nakedshorts[];
double nakedlongs[];
double open_price;
double stop_loss_price;
double take_profit_price;
double open_price2;
double stop_loss_price2;
double take_profit_price2;
double OrderOpenPrice;
double OrderProfit;
string symbol = Symbol();
int init() {
return(0);
}
int deinit() {
return(0);
}
int start() {
int i, counter;
int counted_bars=IndicatorCounted();
int longcount, shortcount;
double nlongs;
double nshorts;
double longaveragebuffer;
double shortaveragebuffer;
int order_type;
profits = 0;
int hstTotal=OrdersHistoryTotal();
counter = 0;
// Print("Ratio = ", Ratio);
for(i=OrdersTotal()-1; i>=0 ; i--)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false)
{
Print("Access to orders list failed with error (",GetLastError(),")");
break;
}
if (OrderType() == OP_BUY)
{
nlongs = nlongs+OrderLots();
longcount = longcount+1;
longaveragebuffer = longaveragebuffer+(OrderOpenPrice()*OrderLots());
}
if (OrderType() == OP_SELL )
{
nshorts = nshorts+OrderLots();
shortcount = shortcount+1;
shortaveragebuffer = shortaveragebuffer+(OrderOpenPrice()*OrderLots());
}
}
if (nlongs!=nshorts){
// Parabolic break up OverHedge for shorts
if (nlongs<nshorts && (High[3]>High[4] || High[4]>High[5])
&& Close[3]>iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_UPPER,3)
&& High[1]-Low[1]<900*Point
&& (High[2]-Low[2]>400*Point || (Close[4]>iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_UPPER,4) && Close[5]>iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_UPPER,5)))
&& High[2]<High[3] && Close[2]<iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_UPPER,2)
&& Close[1]>iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_UPPER,1) && High[1]==iHigh(symbol,0,iHighest(symbol,0,MODE_HIGH,4,1))
&& High[1]>iBands(symbol,0,120,2,0,PRICE_MEDIAN,MODE_UPPER,1)
) {
RemoveStopsandTargets();
open_price2 = NormalizeDouble(Ask, Digits);
stop_loss_price2 = NormalizeDouble(0.00,Digits);
take_profit_price2 = NormalizeDouble(0,Digits);
for (i = OrdersTotal() - 1; i >= 0; i--)
if (OrderSelect(i, SELECT_BY_POS))
if (OrderMagicNumber() == magic_number2) {
order_type = OrderType();
if (order_type == ORDER_TYPE_BUY) {
if ((NormalizeDouble(OrderOpenPrice(), Digits) != open_price2) || (NormalizeDouble(OrderStopLoss(), Digits) != stop_loss_price2) || (NormalizeDouble(OrderTakeProfit(), Digits) != take_profit_price2)) {
if (!OrderModify(OrderTicket(), open_price2, stop_loss_price2, take_profit_price2, OrderExpiration()))
Print("Error: ", ErrorDescription(_LastError));
}
break;
}
else if (order_type == ORDER_TYPE_BUY)
break;
}
if (i < 0)
if (OrderSend(symbol, OP_BUY, NormalizeDouble((nshorts-nlongs)*overhedge/100,2), open_price2, 3, stop_loss_price2, take_profit_price2, magic_number2+" EQUITY HEDGER BUY 0/0", magic_number2) < 0)
Print("Error: ", ErrorDescription(_LastError));
}
else
for (i = OrdersTotal() - 1; i >= 0; i--)
if (OrderSelect(i, SELECT_BY_POS))
if (OrderMagicNumber() == magic_number2 )
if (OrderType() == ORDER_TYPE_BUY_STOP)
if (!OrderDelete(OrderTicket()))
Print("Error: ", ErrorDescription(_LastError));
// Parabolic break down OverHedge For Longs
if (nshorts<nlongs && (Low[3]<Low[4] || Low[4]<Low[5])
&& Close[i]<iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_LOWER,3)
&& High[1]-Low[1]<900*Point
&& (High[3]-Low[3]>400*Point || (Close[4]<iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_LOWER,4) && Close[5]<iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_LOWER,5)))
&& Low[i]>Low[3] && Close[2]>iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_LOWER,2)
&& Close[1]<iBands(symbol,0,30,2,0,PRICE_MEDIAN,MODE_LOWER,1)+20*Point
&& Low[1]<=iLow(symbol,0,iLowest(symbol,0,MODE_LOW,4,1))+20*Point
&& Low[1]<iBands(symbol,0,120,2,0,PRICE_MEDIAN,MODE_LOWER,1))
{
RemoveStopsandTargets();
open_price2 = NormalizeDouble(Bid, Digits);
stop_loss_price2 = NormalizeDouble(0,Digits);
take_profit_price2 = NormalizeDouble(0,Digits);
for (i = OrdersTotal() - 1; i >= 0; i--)
if (OrderSelect(i, SELECT_BY_POS))
if (OrderMagicNumber() == magic_number2) {
order_type = OrderType();
if (order_type == ORDER_TYPE_SELL) {
if ((NormalizeDouble(OrderOpenPrice(), Digits) != open_price2) || (NormalizeDouble(OrderStopLoss(), Digits) != stop_loss_price2) || (NormalizeDouble(OrderTakeProfit(), Digits) != take_profit_price2)) {
if (!OrderModify(OrderTicket(), open_price2, stop_loss_price2, take_profit_price2, OrderExpiration()))
Print("Error: ", ErrorDescription(_LastError));
}
break;
}
else if (order_type == ORDER_TYPE_SELL)
break;
}
if (i < 0)
if (OrderSend(symbol, OP_SELL, NormalizeDouble((nlongs-nshorts)*overhedge/100,2), open_price2, 3, stop_loss_price2, take_profit_price2, magic_number2+" EQUITY HEDGER SELL 0/0", magic_number2) < 0)
Print("Error: ", ErrorDescription(_LastError));
}
else
for (i = OrdersTotal() - 1; i >= 0; i--)
if (OrderSelect(i, SELECT_BY_POS))
if (OrderMagicNumber() == magic_number2)
if (OrderType() == ORDER_TYPE_SELL_STOP)
if (!OrderDelete(OrderTicket()))
Print("Error: ", ErrorDescription(_LastError));
return(0);
}
}
double RemoveStopsandTargets()
{
int i;
for (i = OrdersTotal() - 1; i >= 0; i--){
if( OrderSelect(i,SELECT_BY_POS, MODE_TRADES))
if( OrderType()==OP_BUYSTOP && MathAbs(OrderOpenPrice()-Ask)<.003)
OrderDelete( OrderTicket() );
else if( OrderType()==OP_SELLSTOP && MathAbs(OrderOpenPrice()-Bid)<.003)
OrderDelete(OrderTicket());}
for (i = OrdersTotal() - 1; i >= 0; i--){
if( OrderSelect(i,SELECT_BY_POS)){
if (OrderType() == OP_SELL
//&& OrderMagicNumber()!=magic_number3
){
if (!OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(0,4), NormalizeDouble(0,4), OrderExpiration()))
Print("Error: ", ErrorDescription(_LastError));
}
if (OrderType() == OP_BUY
//&& OrderMagicNumber()!=magic_number3
) {
if (!OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(0,4), NormalizeDouble(0,4), OrderExpiration()))
Print("Error: ", ErrorDescription(_LastError));
}
}
}
return(0);
}
I am baffled by people who think they can trade everything. I am barely starting to develope some understanding for one single instrument’s behavior.