Looking/Asking for Parabolic SAR EA

Hello Everybody that clicked on this Forum,

         Believe it or not, I am on this crazy search for an EA that will do a couple things.

1 - allow me to choose the lot size that is made when a trade is opened.
2 - Using Parabolic SAR (as it is in MT4 default settings) open a trade whenever there is a reversal of the SAR and at that time, close the existing order.
3 - work in the Eur/Usd market in time frames of H1, H4, Daily.

Sooo…when I load the EA, set for live trading and set my lot sizes, it will wait for the first reversal and open a trade (no sl or tp) then when another candlestick opens with another reversal it will open a new trade and close the existing one (of course it goes long/short per the SAR suggestion).

If anyone knows of one and would post it, or has the time and knowledge to code one up, I would really really appericate it.

Thank you.

Hi,

I think you should check a post by james “45 pips a day EUR/USD”

look at the atachements its named “SAR Color”. Just modify the SAR settings

to your liking. Hope it helps…

Thanks Raffy

Thank you Raffty, I tried to get the EA from his system but it wont let me attatch it to any charts :frowning:

Welcome,

I think this will help you makin the EA work.
though this is only a custom indicator. you still have to place your orders manualy. but it will play a sound when PSAR changes direction. (just set your speakers high to alert)

  1. open metaeditor.
  2. when metaeditor is already open.
  3. open your file (the one you down loaded)
    this will open the file in the editor.
  4. click new in metaditor
  5. select “custom indicator” …
  6. delete everything below " #property link… "
  7. then copy the one you downloaded, to the new tab or page you just made.
    (copy or transfer everything below the " #property link …"
  8. press f5.
  9. the new one you created should apear in the "custom indicator"
    if it doesnt try restarting your metatrader.

Raffy

Thank you again Raffty,
I am really looking for an EA rather than an indicator…Personally I know that sometimes if I have a skill at something and someone asks me to do it for them…the least I want is for them to take a shot at it first…so I have fried my brain and tried to write my first EA. (I knew very little of any programing 4 hours ago).
Goal of this EA:
Open an order AS SOON as there is a reversal of PSAR, and close any existing order as well.
I couldnt figure how to have the EA see a pure PSAR reversal, so I wrote it kinda like a SMA cross method, but rather than a Short SMA and a Long SMA I used a SMA that will just sit right in the middle of the candle sticks…then when the PSAR is below that = open buy, when PSAR is above that = open sell. (at least I think I did)
Problems, I dont even know if I am close, and when I try to pull it from my EA dropdown and pull it to a chart i get a message that says it cannot be loaded.
Would someone PLEASE look at this and tell me what I am doing wrong.
(sorry its so long of a post)

//±-----------------------------------------------------------------+
//| PSAR_Only.mq4 |
//| Michael |
//| N/A |
//±-----------------------------------------------------------------+
#property copyright “Michael”
#property link “N/A”

//---- input parameters
extern double Lots=1.0;
//±-----------------------------------------------------------------+
//| expert initialization function |
//±-----------------------------------------------------------------+
int init()
{
//----

//----
return(0);
}
//±-----------------------------------------------------------------+
//| expert deinitialization function |
//±-----------------------------------------------------------------+
int deinit()
{
//----

//----
return(0);
}

int Crossed (double line1 , double line2)
{
static int last_direction = 0;
static int current_direction = 0;

if(line1>line2)current_direction = 1
if(line1<line2)current_direction = 2

if(current_direction != last_direction)
{
last_direction = current_direction;
return (last_direction);
}
else
{
return (0);
}
}
//±-----------------------------------------------------------------+
//| expert start function |
//±-----------------------------------------------------------------+
int start()
{
//----
double sma, psar

//----
sma = iMA(NULL,0,1,0,MODE_SMA,PRICE_MEDIAN,0);
psar = iSAR(NULL,timeframe,0.02,0.2,0);

int isCrossed = Crossed (sma,psar);

total = OrdersTotal();
if(total < 1)
{
if(isCrossed == 1)
{
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,NULL,12345,0,Green);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES))
Print("BUY order opened : ",OrderOpenPrice());
}
else Print("Error opening BUY order : ",GetLastError());
return(0);
}
if(isCrossed == 2)
{
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,0,NULL,12345,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES))
Print("SELL order opened : ",OrderOpenPrice());
}
else Print("Error opening SELL order : ",GetLastError());
return(0);
}
return(0);
}

{
// should it be closed?
if(isCrossed == 2)
{
OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet);
// close position
return(0); // exit
}

// should it be closed?
if(isCrossed == 1)
{
OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet);
// close position
return(0); // exit
}

return(0);
}
//±-----------------------------------------------------------------+

michael, why don’t you post your requeest in this thread -

http://forums.babypips.com/free-forex-trading-systems/13210-i-will-make-you-free-ea-based-your-trading-strategy.html

cheers!

To the OP,

I’ve tried making a Parabolic SAR EA before, it doesn’t work that great. Even if you combine it with RSI and Stochastic it still usually loses money. I can whip something up if you want one, but it’s really not worth it. Or at least not with the settings I tried. It was actually one of the more useless indicators I have tried to incorporate into my EA so far… you just can’t make it work.

Hello Yarcofin,
If you would be able to put together an EA that opens based off a PSAR reversal with options for me to adjust the lot size, s/l, and t/p I would really appericate it. I am not sure if this is possible but If I could run it in 3 different charts that would be ideal.
I am not sure what settings you used before, or if you did a live test or used testing software, but when I manually back test PSAR in the EUR/USD market from Jan 1 2008 - Current on time frames of 1HR, 4HR, and Daily charts it is actually quite profitable if the trade open on the reversal, and closes the existing trade at that time as well…I do notice there are losses, but they are small and the gains are better than average, so it becomes a matter of money management from there.
If you would be kind enough I would really appericate it.
I will open a new demo account and post the results so people can follow it.

(I will also post this on your forum)

Hi Raffy,
You speak of a sound alert for psar…
I have been looking for a thing like that. Appreciate if you say where I can find?
Thanks
Ceeva

Hi Ceeva, the answer to your question is above…

Raffy

Well, I can give it a try.

Its just this modifying stuff… turns to haywire in my hands.

thanks
Ceeva

Hi Ceeva,

you dont have to modify the EA… it works perfectly…

you just need to modify the PSAR settings to you liking or desired setting…

e.g. the step 0.02 and maximum 0.2.

if what you mean is making it work. see my post below on how to transfer or

make it work with you brokers metatrader…

Raffy

Right.

No programming.

Hi Raffy,
RE sar color.
It works, testing on M1, loud and clear.
Thanks again.

What would be best settings for H1 sar?

Hi Raffy,

I used a MT4 programmer to code the EA for me. It allows me to set the lot settings, t/p, s/l, also adjust the psar variables(default is 0.02, 0.2). The EA will initiate the trade upon the appearance of the first dot (of a new trend) and will close and start the opposite reversal trade also on the first dot. Most PSAR EA’s will only start the trade on the opening of the second dot. There is also an additional feature which allows the EA to stop trading after xxx pips have been realized in a month and then you could start the EA again at the beginning of the following month. I have always noticed in my backtest that if the EA just keeps running, it will either lose or have marginal gains. The other feature which is in here is that there is a setting to only trade during certain hours. I have noticed that certain pairs trade well only during the London session.

I paid US$140 for this, so if you want to share the cost with me, I can release this to you with full commercial rights for you to resell.

I can send you the backtest report, if you like. Just send me the parameters you would like me to use.

arbus, raffy hasn’t looked in here since year 2009!

:slight_smile: