[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 274

 
Vinin:

We have to redo all the logic. It's rather confusingly done. Maybe you should start by refusing from objects and draw using indicator buffers.

I need to draw and forward in history (i.e. to the right of the zero bar), but I do not understand how to do it through buffers. What is it confusing about? Although I'm already used to write it this way, maybe it's harder for others to read :)

PapaYozh:

Here's what it says:

2011.10.18 22:28:19 TEST__ EURGBP,H1: y=1 Time[y]=2011.08.04 08:00
2011.10.18 22:28:17 TEST__ EURGBP,H1: y=1 Time[y]=2011.08.03 08:00
2011.10.18 22:28:15 TEST__ EURGBP,H1: y=1 Time[y]=2011.08.02 08:00
2011.10.18 22:28:13 TEST__ EURGBP,H1: y=15 Time[y]=2011.08.01 08:00

Code:

I.e. it's kinda right.

Did you start the turkey, close the MT with it, then open it and it outputs all right?

 

Help to tweak EA



avatar
5
folw 19.10.2011 09:56

Please help me to tweak my Expert Advisor. It opens a pending order. I want it to delete a pending order, which has not worked after 2 new signals triggered all the time.

Example: 1Signal puts a pending order

2) "2-signal" also places an order

3 - Signal sets an order and deletes 1 order if it did not trigger.

The Expert Advisor works better on 15.

If you have any other ideas how to improve it, I would be happy to see?

I attach advisor!!!!

Files:
main_1.ex4  7 kb
 
Solree:

I need to draw and forward into history (i.e. to the right of the zero bar), and I haven't figured out how to do this through the boo-boobs.

Did you start the indicator, closed MT with it, then opened it and it displayed everything normally?


Tell me, what does "closed/open" mean?

Finished MT through "File"->"Exit" or by pressing [X] ?

If so, at the moment of MT start there is no a part of history and the indicator works on an incomplete history. And when the history is loaded, the indicator has already worked out its cycle and waits for the next day.

 
PapaYozh:

Why should it be? How do we know what you have in Open[i-2] ?

You must have missed it. Please look again - at the top of the excerpt what you are asking for has been stated. I will repeat it again:

i = 2, Open[i-2] = 1.5715
14:21:15 2011.01.12 18:08 My Fr Chekulaeva1 GBPUSD,M1: Low[i] = 1.5713, Low[i-1] = 1.5714
14:21:15 2011.01.12 18:08 My Fr Chekulaev1 GBPUSD,M1: Low[i+1] = 1.5714, Low[i-2] = 1.5715
14:21:15 2011.01.12 18:08 My Fr Chekulaev1 GBPUSD,M1: Open[i-2]-(Low[i]-1*PointX) = 0.0004

14:21:15 2011.01.12 18:08 My Fr Chekulaev1 GBPUSD,M1: 1*PointX = 0.0001

15-(13-1) should be 3. But in the tester it's 4. What's wrong?

 
PapaYozh:


Tell me, what does "close/open" mean?

Have you closed MT via "File"->"Exit" or by pressing [X] ?

If so, at the moment of MT start there is no a part of history and the indicator works on the incomplete history. And when the history is loaded, the indicator has already worked out its cycle and waits for the next day.

Wooooooo! That's closer to the problem. How do you make it wait? I remember trying to freeze it for 1 tick at startup, but alas, it didn't work. Pause it just for a couple of seconds at the beginning? Trying Sleep now, it ignores this function altogether...
 
globad:
Hello! Guys, please help! I need an EA that repeats actions from one account or terminal on another. I've heard about them somewhere. I don't want it to just repeat the action, but to do the opposite. In other words, if on the first account it is bought, it needs to sell on the second one. In short, I want it to make lots on different accounts. I am trying to master master curry trade from two accounts. Perhaps there is something similar to this one, or may be ready to use. Thank you in advance.
This is called a deal duplicator. It is better to order it from some programmer for your task than to buy it somewhere. I asked a programmer about 2 years ago - search on -----------, you will get to his site. You can also find a programmer here who has experience in creating duplicators.
 
Good afternoon.
Can you please tell me if my EA opens two orders at the same time: both buy or both sell. One is with a fixed take profit, the other one is trailing.
Sometimes the second order is not opened in time.
How to solve this problem?
Will it solve the problem to open the second terminal and open one order in each terminal?
Or to open a second account and open one order on one account and another on another one?
 

Can you tell me please (or can you give me a link if it's already been mentioned) how to display two lines of one indicator from different

timeframes. For example:

/-------------------------------------------------------------------+  
   switch(Period())   
        { 
         case     1: PeriodSlow=PERIOD_M5; break; //            для -Таймфрейма М1
         case     5: PeriodSlow=PERIOD_M15; break;//                -Таймфрейма М5
         case    15: PeriodSlow=PERIOD_H1; break; //                -Таймфрейма М15 т.е. след. период Н1
         case    30: PeriodSlow=PERIOD_H1; break; //                -Таймфрейма М30
         case    60: PeriodSlow=PERIOD_H4; break; //                -Таймфрейма H1
         case   240: PeriodSlow=PERIOD_D1; break; //                -Таймфрейма H4
         case  1440: PeriodSlow=PERIOD_W1; break; //                -Таймфрейма D1
         case 10080: PeriodSlow=PERIOD_MN1; break;//                -Таймфрейма W1
         case 43200: PeriodSlow=PERIOD_W1; break; //                -Таймфрейма МN
        }                                    
//-------------------------------------------------------------------+ 
   PeriodFast = 0; 
   return(0);
  }
//+------------------------------------------------------------------+
int start()
  {
   double MaSlow,MaFast; // SlowMa-MA большего периода, FastMa-MA текущего периода
   int limit, CountedBars=IndicatorCounted();
   
   if(CountedBars>0) CountedBars--;
   limit=Bars-CountedBars;
   if(limit>History) limit=History;
   
    for(int i=0; i<limit; i++)
     {
      MaSlow=iMA(NULL,PeriodSlow,MAPeriod,0,MODE_SMA,PRICE_HIGH,i);      
      MaFast=iMA(NULL,PeriodFast,MAPeriod,0,MODE_SMA,PRICE_HIGH,i); 
      LineSlow[i]=MaSlow;      
      LineFast[i]=MaFast; 
     } 
//---- done
    return(0);
  }
//+------------------------------------------------------------------+

In this case at updating after some time the mutual positioning of lines changes

 

How do I print a request message? Example of messages from the log:

2011.10.19 13:04:11 '183927376': order buy 0.01 EURGBP opening at 0.8768 sl: 0.0000 tp: 0.8822 failed [trade timeout]

2011.10.19 13:00:52 '183927376': request in process

for 3.5 min there was no connection to the server.

My EA is displaying all the error messages. But this one stays without any reaction from EA, and I would like to fix the time of no connection in seconds.

 
Stells:
Good afternoon.
Can you please tell me if my EA opens two orders at the same time: both buy or both sell. One is with a fixed take profit, the other one is trailing.
Sometimes the second order is not opened in time.
How to solve this problem?
Will it solve the problem to open the second terminal and open one order in each terminal?
Or to open a second account and open one order on one account and another on another one?
They don't open at the same time anyway, but in sequence. "Doesn't have time to open" before what? The order will open, but it all depends on the speed of order processing by the broker. It can sometimes take a few minutes, see my previous post. There was no connection with broker for 3.5 minutes and no one can predict when it will happen - when the order sequence is set or after it is already set.
Reason: