|
|||||||
| 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 |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
Quote:
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 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);
}
}
Code:
if ((Hour()==HourOpen && Minute()>=MinuteOpen)) 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) Code:
//---- buy conditions if(Open[1]<ma && Close[1]>ma) Code:
Close [1]<ma 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; 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. |
|
||||
|
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. |
|
|||
|
Besides you may use templates to create EA Templates to create EAs and Indicators
I used it. |
|
|||
|
Quote:
Quote:
I am not starting anything behind this forum. Not yet ![]() Last edited by newdigital : 12-14-2005 at 12:57 PM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|