The Only Pivot - page 205

 
TimeFreedom:
I have been working on a filter most of last week and have come up with a non-indicator filter using the existing idea of the open price pivot.

The filter is the weekly open price to filter out some of the choppy days. We won't filter out all the choppy days, but a majority of choppy days will be filtered out with this additional weekly open price filter. At the same time we will also filter out some good trades if we were only using the daily open price pivot without the weekly open price pivot filter.

The weekly filter doesn't come into play until Tuesday since the weekly and the daily open price is the same on Mondays, therefore we have no filters on Mondays. We only utilize the weekly filter ("W1F") on Tuesday - Friday. Here are some examples on how the W1F will work:

On Tuesday we have a Daily Open Price of 208.27 and the Weekly Open Price

of 209.13. We would only take trades if SMMA closes below the Daily Open Price of 208.27, Sell, or above Weekly Open Price

of 209.13, Buy.

Enclosed you will find a chart with the daily and weekly open price levels. I have also enclosed the indicators OnlyPivot_Level_WF1, which plots the daily and weekly open price levels and the OnlyPivot_Signal_WF1 for the signals. You will also find the _OnlyPivot_W1F_01 template.

PS: I am open for new ideas and constructive criticism. Let me have it. David can you code the W1F into your EA? I would like to run some backtests to optimize SL and TP? The gold horizontal line is the weekly open price and the teal is the daily open price.

TimeFreedom

I will work on one tonight.

 

Could someone post or tell where can i find the OnlyPivot_Level.mq4 file. This thread too big to fint it manualy. Thanks a lot.

 

You can find the indicators and template here.

TimeFreedom

Dezil:
Could someone post or tell where can i find the OnlyPivot_Level.mq4 file. This thread too big to fint it manualy. Thanks a lot.
 

I don't know if this will help, but take a look at the closure logic I found in one of my EA's:

//+------------------------------------------------------------------+

//| Close All Open Positions |

//+------------------------------------------------------------------+

void CloseAllOrders()

{

int total=ScanOpenOrders();

for(int cnt = 0; cnt < total; cnt++)

{

OrderSelect(cnt, SELECT_BY_POS);

if(OrderMagicNumber()!= MagicNumber ){continue;}

if(OrderSymbol()!=Symbol()){continue;}

else

{

if(OrderClose(OrderTicket(),OrderLots(),NormalizeDouble(Bid,Digits),Slippage,Crimson)==true)

{

if(CloseSuccessAlerts){Alert("Order was successfully closed.");}

if(ScanOpenOrders()==0)

{

CloseTrade=false;

OpenTrade=false;

break;//stop the loop

}

else

{continue;} //if there are more trades keep looping and closing

}//if(OrderClose(OrderTi

else//close was not successful

{

if(CloseFailAlerts){ Alert("Order Close failed will retry next tick.");}

int err=GetLastError();

if(err==4 || err==137 ||err==146 || err==136) //Busy errors

{

Sleep(5000);//wait

cnt++;//try again

}

}//else//close was

}//else (after symbol)

}//for

}//void

davidwillis:
That statement comes on a stop and reverse signal, and right after a closealltrades() function which is supposed to close all the open trades before we open trades in the other direction. For some reason in backtesting, it did not always close all the trades. So I put that in, so it would run through the program again, and close all the trades before we started opening more trades in the other direction. If it only opened one trade, it will not get back to that point again even if you change it, is what we need to change is when it is looking for no open trades. We need to change it to less trades than we are supposed to have, instead of no open trades. It shouldn't be too hard, but we may have one of the trades at a slighly different price.
 

Would it be possible to add a risk percentage input in addition to those that would like to have number lots?

Thanks

 

Thanks to all of you for your input. I used basically what nohills suggested, and fixed my closealltrades (hopefully).

anyway, with the stock settings on this, it should trade just like the onlypivot, but it has the option to add the filter if you want. It should also work for any broker, if you just adjust the times right.

I think this one is working right, so I am giving it the name onlypivot_filter 1.0

Now I will start working on the weekly...

Files:
 

the beauty of FIBBONACHI

Files:
fibbo4.gif  15 kb
 

We have a short signal and I am in @ 209.97 using David's EA v1.2. I am expecting a retracement to the 209.76/209.39 area from yesterdays strong move up.

TimeFreedom

 

EA closed out one lot (0.10) for +50 pips. Should have been +160 pips with two lots.

Note: EA did not open two trades, most likely due to price moving very fast. David has solved this problem we hope.

TimeFreedom

TimeFreedom:
We have a buy signal and I am in long @ 208.56 using David's EA. TimeFreedom
 

First, I want to thank you for your hard work and time. Maybe you can name the new EA using the following naming scheme: OnlyPivot_David_BF_v1.0? BF = Buffer Filter. What do you think?

We should also let everyone know that OnlyPivot_David_BF_v1.0 is the succesor to v1.3, which does not have the Buffer Filter.

Buffer Filter: The Buffer Filter allows you to add a number of pips above and below the open price pivot. Ex. If the open price pivot is 205.10 and you set filter = 12 then what the filter does is add 12 points/pips above and below 205.10. SMMA would have to close above 205.22 (205.10+12=205.22) for a buy and 204.98 (205.10-12=204.98) for sell signal.

TimeFreedom

davidwillis:
Thanks to all of you for your input. I used basically what nohills suggested, and fixed my closealltrades (hopefully).

anyway, with the stock settings on this, it should trade just like the onlypivot, but it has the option to add the filter if you want. It should also work for any broker, if you just adjust the times right.

I think this one is working right, so I am giving it the name onlypivot_filter 1.0

Now I will start working on the weekly...
Reason: