Forex



Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 12-14-2006, 12:56 PM
Junior Member
 
Join Date: Oct 2006
Posts: 21
mistrz-swiata is on a distinguished road
MA cross PRICE level ... EA

Hi everyone !

In the attachement below there is an idea of simple Expert Advisor I'm looking for. Have You seen sth like that ?? I think it's very similar to "MA cross EA" but I'm not a programist and I can't modify the code Can You help me ?


THANKS for reply ...

Michał
Attached Images
File Type: jpg example_jpeg.JPG (54.4 KB, 786 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 12-14-2006, 01:17 PM
Administrator
 
Join Date: Sep 2005
Posts: 20,052
Blog Entries: 241
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
What is 1.2560?
Why 1.2560?

Because MA is crossing this line ...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 12-14-2006, 08:52 PM
Junior Member
 
Join Date: Oct 2006
Posts: 21
mistrz-swiata is on a distinguished road
it can be ANY price .... It is a value that I want to set in the Expert Advisor.

It could be highest price of year/month etc. ; some resistance or support levels ...

Is it clear now ?

ps. może po polsku spróbuje .. chciałbym móc ustawić wartość ceny i chciałbym żeby system podejmował decyzje kupna/sprzedaży za kazdym razem gdy średnia przebija zadany poziom ceny .
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 12-15-2006, 12:13 PM
Administrator
 
Join Date: Sep 2005
Posts: 20,052
Blog Entries: 241
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Seems I did it: MA crossing price level EA.

Explanation of the settings:

#define MAGIC 324430 //magic number, change it inside the code if you will use this EA with many pairs with one MetaTrader.

PARAMETERS_EXPERT = "PARAMETERS EXPERT";
sNameExpert = "MAprzebijaCeny_EA_v1";
colorOpenBuy = Blue;
colorCloseBuy = Aqua;
colorOpenSell = Red;
colorCloseSell = Aqua;
int nAccount =0; // 0 - use this EA with any account.
lFlagUseSound = True;
sSoundFileName = "alert.wav";

PARAMETERS_FILTER = "PARAMETERS FILTER";
lFlagUseHourTrade = False; //timefilter
nFromHourTrade = 8; //trade since 8
nToHourTrade = 17; //till 17:59

PARAMETERS_TRADE = "PARAMETERS TRADE";
double dLots = 0.10;
nSlippage = 5;
dBuyStopLossPoint = 60; //stop loss for buy order
dSellStopLossPoint = 60; //stop loss for sell order
dBuyTakeProfitPoint = 100; //profit for buy
dSellTakeProfitPoint = 100; //profit level for sell
dBuyTrailingStopPoint = 25; //trailing stop for buy
dSellTrailingStopPoint = 25; //trailing stop for sell

PARAMETERS_INDICATOR_ONE = "Moving Average";
extern double MAbig = 12; //period of MA indicator
MAbigMode = 1; //0=sma, 1=ema, 2=smma, 3=lwma

PARAMETERS_INDICATOR_TWO = "Price";
extern double Close0buy = 1.2340; // price level for buy order
extern double Close2sell = 1.2250; // price level for sell order
Attached Files
File Type: mq4 MAprzebijaCeny_EA_v4.mq4 (7.3 KB, 197 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 12-18-2006, 05:27 PM
Junior Member
 
Join Date: Oct 2006
Posts: 21
mistrz-swiata is on a distinguished road
I've found a problem ... It looks like on the pic. below.

system opened LONG ... but when market went in other direction it didn't open SHORT ... why ?

thx for anwser
Attached Images
File Type: jpg expl_jpeg.JPG (72.3 KB, 627 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #6 (permalink)  
Old 12-18-2006, 05:30 PM
Junior Member
 
Join Date: Oct 2006
Posts: 21
mistrz-swiata is on a distinguished road
settings of tester ....

SL - 50
TP - 0
TS - 0

MA - 5 - linear

price - 1.3230

all others default
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #7 (permalink)  
Old 12-18-2006, 05:40 PM
Administrator
 
Join Date: Sep 2005
Posts: 20,052
Blog Entries: 241
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Quote:
Originally Posted by mistrz-swiata
I've found a problem ... It looks like on the pic. below.

system opened LONG ... but when market went in other direction it didn't open SHORT ... why ?

thx for anwser
It is MA-crossing-price-level EA. And this EA was coded to have one order at the time per chart. Most of EAs were coded to have one order at the time per chart. It means that new order will not be opened untill the old one will be closed. This crossing for short was when the long order was opened already. Because it should be one order only.

Seems you need to have many orders at the time per chart in EA (MaxOrder option for example).

I will try to modify this EA tomorrow. Please send the message to me (by PM) tomorrow to re-mind (sorry - too much busy).

Or, may be, some other people can do that.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #8 (permalink)  
Old 12-19-2006, 10:47 AM
Administrator
 
Join Date: Sep 2005
Posts: 20,052
Blog Entries: 241
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
I added Maximum Order options.

Now EA will open the order on every MA-crossing-the-price-level and all the orders are pricessing separatedly from each other by stop loss, take profit and trailing stop.

MaxOrders = 3 by default (3 order per chart).
Attached Files
File Type: mq4 MAprzebijaCeny_EA_v6.mq4 (7.3 KB, 151 views)

Last edited by newdigital; 12-19-2006 at 10:50 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #9 (permalink)  
Old 12-19-2006, 10:00 PM
Junior Member
 
Join Date: Oct 2006
Posts: 21
mistrz-swiata is on a distinguished road
with this modyfication system opened 3 positions when MA crosses price level. (in my example above 3xLONG) And It did;t close them when price moved in other direction

Could You modyfi it to close old position when price moves in other direction ?? It should reverse position each time MAcrosses price level. with a loss that has occured.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #10 (permalink)  
Old 12-20-2006, 01:10 PM
Administrator
 
Join Date: Sep 2005
Posts: 20,052
Blog Entries: 241
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Quote:
Originally Posted by mistrz-swiata
with this modyfication system opened 3 positions when MA crosses price level. (in my example above 3xLONG) And It did;t close them when price moved in other direction

Could You modyfi it to close old position when price moves in other direction ?? It should reverse position each time MAcrosses price level. with a loss that has occured.
Hi mistrz-swiata,

I tried to figure it out and it is my last version. I spend more than 2 days creating this. Sorry.

If the levels for open buy/sell are the same so it will not work.
I mean if:
condition for buy = condition for to close sell (the same value, the same MA, the same price level and everything is the same);
so it does not work.
Sorry. I could not.

It will work with different levels (see default settings): one level for open buy/sell, the other level to close buy and diferent level to close sell. Do you use stop loss? So it may be as stop loss levels for you.

Sorry I did my best.
Attached Files
File Type: mq4 MAprzebijaCenyEA_v16.mq4 (7.5 KB, 184 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Price-level alert indicator wanted abaker Metatrader 4 13 08-28-2009 04:22 AM
EMA Cross Price[URGENT] rajatnaik Metatrader 4 5 05-31-2007 05:33 PM
MA cross/Price cross MA EA Pipsta_UK Expert Advisors - Metatrader 4 5 05-10-2007 09:50 PM
Price Line MA Cross Money Duck Expert Advisors - Metatrader 4 3 04-12-2007 09:36 AM
Alert when price reach a certain level Devil2000 Indicators - Metatrader 4 2 09-04-2006 06:32 PM


All times are GMT. The time now is 06:55 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.