Forex
Google

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-14-2005, 12:39 AM
Teres Teres is offline
Junior Member
 
Join Date: Dec 2005
Posts: 6
Teres is on a distinguished road
Help

Hallo

My name is Teres, I īm a girl....so I īm can understant script and so on, I see it for the first time.

By the way, I try for one week to made my own strategy.....
I copy some part of another of your and try to compile it at all.

After week my pain, I decide ask you for help.

Can you somebody of you help me with compile this?This is my idea for easy strategy.

1) All in one day timeframe
2) I want to open my position exactly at 5:02 time zone in New York
3) I can have two parameter: EMA 30 and price- all in OPEN TIME
4) When EMA 30 is lower than price (at 5:02)than buy
5) and also oother way.... upper price than sell
6) than I need to put there limit for every open position 50 PIP and stop loss 300 PIP

Can somebody help? I think it is not so dificult for experts like you here in this forum....

Regards Teres
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 12-14-2005, 02:30 AM
gabroo_munda gabroo_munda is offline
Member
 
Join Date: Oct 2005
Posts: 58
gabroo_munda is on a distinguished road
hi teres,
i cannot help you code this strategy...because i cannot code myself. but i'll say this...from my experience..your strategy will not be very profitable because your stop loss(300 pip) is six times bigger than your limit order. this is not a good thing to do.
As for coding this strategy...codersguru will be here shortly and mayb he can help you. that guy is a MT4 coding GURU.

regards
gabroo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-14-2005, 10:12 AM
Teres Teres is offline
Junior Member
 
Join Date: Dec 2005
Posts: 6
Teres is on a distinguished road
Hi

Thanks for answear....

Please code Guru for help....

I try to calculate ...this strategy for 2 months...backtested in SPSS and it get about 33x50 and -58-80-125-151-176= 1060 PIP!!!

It seem to be good. There is one more important think to compile.... for 2 months there were no stop loss happend.


Regards Teres
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-14-2005, 10:52 AM
newdigital newdigital is online now
Administrator
 
Join Date: Sep 2005
Posts: 15,432
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 found something inside my computer. I do not know about the time but I think it is very similar with your idea.
Attached Files
File Type: mq4 Moving Average.mq4 (4.6 KB, 21 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 12-14-2005, 11:44 AM
Teres Teres is offline
Junior Member
 
Join Date: Dec 2005
Posts: 6
Teres is on a distinguished road
Thanks

Hallo

Thank you very much....

This i exactly what I tried to copy and compiled with my strategy...it is similar...

But could you help me construct one method like this but which start at exact time? 5:02 PM time zone New York? This it the main breakpoint...

And when you calculate by hand....it seem to be more profitable.....another way and I can learn how to construkt my own strategy.

Thanks

Regards Teres
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 12-14-2005, 12:20 PM
newdigital newdigital is online now
Administrator
 
Join Date: Sep 2005
Posts: 15,432
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 Teres
Hallo

Thank you very much....

This i exactly what I tried to copy and compiled with my strategy...it is similar...

But could you help me construct one method like this but which start at exact time? 5:02 PM time zone New York? This it the main breakpoint...

And when you calculate by hand....it seem to be more profitable.....another way and I can learn how to construkt my own strategy.

Thanks

Regards Teres
Teres,
I studed the coding together with Codersguru lessons so may be, I did some mistake. So you must check everything that I posted below.

It should not be NY time. It should be your server's time (Metatrader's time). Just re-calculate the time acording to your Metatrader.

As I know it may be the following code in the beginning in the place where the settings are located:

Code:
extern bool UseHourTrade = True; //Use time to trade (from ... to ...)
extern int FromHourTrade = 0; // Time to start trading 
extern int ToHourTrade = 23; // Time to finish
extern int HourOpen = 7; // Exact hour to open the order
extern int MinuteOpen = 0; //exact minutes to open the order
And after that you may use the following (as example):

Code:
int start(){

for (int i=0; i<OrdersTotal(); i++) {
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
TrailingPositions();
}
}
if (UseHourTrade){
if (!(Hour()>=FromHourTrade && Hour()<=ToHourTrade)) {
Comment("Not time to trade!");
return(0);
}
}
if(Bars<100){
Print("bars less than 100");
return(0);
}

if (prevCountBars != Bars && prevCountBars !=0 && !ExistPositions()) {
if(AccountFreeMargin()<(1000*Lots)){
Print("no money available. Free Margin = ", AccountFreeMargin());
return(0);
}


if ((Hour()==HourOpen && Minute()>=MinuteOpen)){
OpenBuy();
Sleep(3000);
OpenSell();
return(0);
}
}
If you want to open the order exact at the time you estimated you may change this one:

Code:
if ((Hour()==HourOpen && Minute()>=MinuteOpen))
on to that one:

Code:
if ((Hour()==HourOpen && Minute()==MinuteOpen))


But in this case you must be sure that the price is crossing the MA exact at the time. Otherwise you need to change something inside the EA also because the EA I posted above is trading when the price is crossing the MA but as I understand you need the price to be above or below MA at the time you estimated.


In the EA I posted the sell condition is the following:

Code:
//---- sell conditions
   if(Open[1]>ma && Close[1]<ma)
And buy condition:

Code:
//---- buy conditions
   if(Open[1]<ma && Close[1]>ma)
So it works on the price-ma crossing. But as I understand you need the price above or below so use just
Code:
Close [1]<ma
only for example for sell or something else (I do not know).

You also mentioned that you need for everything to be in opened bar (zero bar) because you are using D1 timeframe. In this case it may be for sell:

Code:
Open[0]<ma;
Sorry I can not help you a lot because I am studying Codersguru lessons together with everybody and may be I did mistake somewhere. I think Codersguru may check it because he is more professional with this subject.

Just try, open the EA I posted above this post and change everything. And may be it will work.

Last edited by newdigital : 12-14-2005 at 12:31 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 12-14-2005, 12:36 PM
firedave's Avatar
firedave firedave is offline
Senior Member
 
Join Date: Nov 2005
Location: Jakarta, Indonesia
Posts: 416
firedave is on a distinguished road
Question

By the way, is this Teres from Teres-Forex http://www.[something].cz/forexcz/ since you got the same strategy. I thought you already start your signaling service ?

Last edited by newdigital : 12-14-2005 at 12:56 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 12-14-2005, 12:37 PM
newdigital newdigital is online now
Administrator
 
Join Date: Sep 2005
Posts: 15,432
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
Besides you may use templates to create EA Templates to create EAs and Indicators
I used it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 12-14-2005, 12:45 PM
newdigital newdigital is online now
Administrator
 
Join Date: Sep 2005
Posts: 15,432
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 firedave
By the way, is this Teres from Teres-Forex http://www.[something].cz/forexcz/ since you got the same strategy. I thought you already start your signaling service ?
I do not know (do not care). This EMA-above/below-NY time is her strategy (not mine). She asked for help and sent two PMs to me so I just did what I could. That's all.

Quote:
I thought you already start your signaling service ?
Which service?
I am not starting anything behind this forum.
Not yet

Last edited by newdigital : 12-14-2005 at 12:57 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 12-14-2005, 12:48 PM
firedave's Avatar
firedave firedave is offline
Senior Member
 
Join Date: Nov 2005
Location: Jakarta, Indonesia
Posts: 416
firedave is on a distinguished road
Quote:
Originally Posted by newdigital
I do not know (do not care). This EMA-above/below-NY time is her strategy (not mine). She asked for help and sent two PMs to me so I just did what I could. That's all.



Which service?
I am not starting anything behind this forum.
LOL I am not asking you newdigital. The question is for Teres herself. Sorry for the misunderstanding
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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

vB 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. The time now is 08:11 AM.