Go Back   BabyPips.com Forex Forum > "The Holy Grails" > Free Forex Trading Systems
Free Forex Trading Systems Got the "Holy Grail" system? Want to share it for free and become everyone's hero? This is the place to do it. (No advertisers please!) Also, follow along as our very own Pip Surfer posts daily updates from his Cowabunga System in the Pip My System Forex Blog.

Welcome to the BabyPips.com forum!

You are currently viewing our boards as a guest which allows you to view the discussions, but prevents you from contributing. By joining our FREE community you will be able to do all of the following:

  • Post topics & responses to other discussions
  • Communicate privately with other members (PM)
  • Respond to polls
  • Upload content
  • Post comments on our blogs
  • Contribute on our Forexpedia

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.



Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-30-2008, 03:38 AM
Senior Member
 

Join Date: Mar 2008
Location: Montana
Posts: 122
Send a message via Skype™ to mtandk0614
Default 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.
Reply With Quote
  #2 (permalink)  
Old 05-30-2008, 04:41 AM
Newbie
 

Join Date: Feb 2008
Posts: 35
Default

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
Reply With Quote
  #3 (permalink)  
Old 05-30-2008, 05:24 AM
Senior Member
 

Join Date: Mar 2008
Location: Montana
Posts: 122
Send a message via Skype™ to mtandk0614
Default

Thank you Raffty, I tried to get the EA from his system but it wont let me attatch it to any charts
Reply With Quote
  #4 (permalink)  
Old 05-30-2008, 05:50 AM
Newbie
 

Join Date: Feb 2008
Posts: 35
Default

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
Reply With Quote
  #5 (permalink)  
Old 05-31-2008, 05:04 AM
Senior Member
 

Join Date: Mar 2008
Location: Montana
Posts: 122
Send a message via Skype™ to mtandk0614
Default

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,NU LL,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,N ULL,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);
}
//+------------------------------------------------------------------+
Reply With Quote
  #6 (permalink)  
Old 05-31-2008, 07:28 AM
Newbie
 

Join Date: Jan 2008
Posts: 43
Arrow

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


I will make you a free EA based on your trading strategy

cheers!
Reply With Quote
  #7 (permalink)  
Old 05-31-2008, 02:36 PM
Yarcofin's Avatar
Master Contributor and Member
 

Join Date: Apr 2008
Location: Ontario, Canada
Posts: 306
Send a message via MSN to Yarcofin
Default

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.
Reply With Quote
  #8 (permalink)  
Old 05-31-2008, 03:58 PM
Senior Member
 

Join Date: Mar 2008
Location: Montana
Posts: 122
Send a message via Skype™ to mtandk0614
Default

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)
Reply With Quote
  #9 (permalink)  
Old 06-05-2008, 04:03 AM
 

Join Date: Jun 2008
Posts: 9
Default

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
Reply With Quote
  #10 (permalink)  
Old 06-05-2008, 09:06 AM
Newbie
 

Join Date: Feb 2008
Posts: 35
Default

Quote:
Originally Posted by raffy View Post
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
Hi Ceeva, the answer to your question is above..

Raffy
Reply With Quote
Reply



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -4. The time now is 12:08 AM.
Content Relevant URLs by vBSEO 3.2.0
"When I hear somebody sigh, Life is hard. I am always tempted to ask, Compared to what?"
Sydney Harris