[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 9

 
FAQ:
Nothing is impossible, put pending orders at stop-loss and takeaway levels of the previous one and you will be happy
You can do it by the market as well...
 
artmedia70:
You can also go through the market...

You can, but if a person is asking questions like this, it would be easier for him to work with the pauses.
 
FAQ:

You can, but if a person asks questions like this, it will be easier for him to work with the pauses.
Not everyone knows this language as well as you do ))))) can you write this function in mql4 ?
 

I will, but will you be able to use them? - that is the question.

And the variant with pauses is no worse than that, and even better in some senses, because when the stop/stop is triggered in a fast market, you will not always or always be able to open a new order at exactly the same price. For instance, if you have a slippery slope and you don't want it to slip out, you may open a new order at the same price, and requotes again.

They don't have any effect on your trading activity because they don't have any effect on your trading activity because you don't have any marketing plan.

ZSYZZ. "Auntie Sonya will not give you bad advice." (s) :))

 
vkontakte0:
I don't know this language as well as you do ))))) can you write this function in mql4 ?

Everyone must have built a house out of bricks as a child...

My advice: Find Igor Kim's thread on this forum. He has all sorts of functions for all sorts of situations there.

Start with those. Although they are heavy and excessive because of their versatility, they are an excellent material for training purposes.

Each function comes with a script and a description for testing the function.

Start building your EA with them, like a house of bricks, and I assure you that you will ask fewer questions and your question will have a much more professional tone.

Try it, it's simple and very visual.

ZS. By the way, it's all there to solve your problem. And it's as simple as 2*2

 
vkontakte0:
i can ask: if price closed on Stop, then it will open a deal on the same side if it is profitable, then also on the same side?? just yes or no? )))) thanks))

You can. I can do it, but why should I close if I want to open the order in the same direction?

Mine is not clear.

 
paukas:

You can. But why close it when you open it "tight"?

Mine doesn't understand.

To open tighter ;)
 
FAQ:
Swaps are calculated elementary, so are the commissions - just have a good look at the brokerage site and their terms.

Would you be more specific if you meant manually with a calculator + paper or with an MQL script?

The question was originally posed probably about manual calculation.

 

for GOD'S sake, don't delete. QUEST.

THE MOST IMPORTANT (I bet).

WHAT ARE TICS?

From the point of view of a programmer, not a trader

Various sources say only a minimum change in

PRICE.

It is clearly a TECHNICAL PARAMETER, what is it?

P.S.

the impression is that there is NO ENTRY, but then we are talking about

RIGHTS TO THE LICENSE OF THIS TERMINAL.

SO IT IS!

 
Good day to all!
I decided to rewrite the code of my indicator for an Expert Advisor to track
I have decided to change the code of my indicator to track the operation of its signals.
I have no errors when compiling it and it works in the Strategy Tester without errors.

I do not know how to use it.

Z.I. I'm sure there are a lot of mistakes and stupid, please shoot blanks.

//+------------------------------------------------------------------+
//|                                              Ti&Pi_Exp.mq4       |
//|                                        Copyright © 2012, FOX.RM  |
//|                                             fox.rm@mail.ru       |
//+------------------------------------------------------------------+

#property copyright "Copyright © 2012, FOX.RM"
#property link      "fox.rm@mail.ru"

int start() {  
 
double MA1[],MA2[];
double delta,price,old_price,col_bar,sum_tick,sum_pip,TP_UP[],TP_DN[],TP_UPMin[],TP_DNPl[];
int sum_pip_bay,sum_pip_sell,i=0,limit,k=0,old_sell=0,old_bay=0;
int count_plus,count_minus;
datetime time_Bar; 

  int counted_bars=IndicatorCounted();   
  if(counted_bars<0) return(-1);
  if(counted_bars>0) counted_bars--;
  limit=Bars-counted_bars;
  
  ArrayResize(MA1,Bars);ArrayResize(MA2,Bars);
  ArrayResize(TP_UP,20);ArrayResize(TP_DN,20); 
  ArrayResize(TP_UPMin,20);ArrayResize(TP_DNPl,20);
  
  if(limit>0) limit=0;
    
   for(i=0; i<=limit; i++) 
  { 
      
    price = Close[i]/Point;    
    delta = price-old_price;
          
    if(!time_Bar)time_Bar=Time[0];
    col_bar = iBarShift(NULL,0,time_Bar)-iBarShift(NULL,0,Time[i]);
    if (col_bar >= 1)
    
    {time_Bar=Time[i];sum_pip_bay=0;
    sum_pip_sell=0;sum_pip=0;
    old_bay=0;old_sell=0;sum_tick=0;
    count_plus=0;count_minus=0;}
     
     //---- Расчет UP
    if(delta>=0)
    {if(delta>100)delta=1;
    sum_pip_bay = delta + old_bay;   
    old_bay=sum_pip_bay;
    count_plus++;}  
    
     //---- Расчет Down
    if(delta<0)
    { sum_pip_sell = delta+old_sell;
     old_sell=sum_pip_sell;
    count_minus++;}
          
        sum_tick=count_plus+count_minus;
        sum_pip=sum_pip_bay+MathAbs(sum_pip_sell);
     
      //---
  
        if (MA1[i]>=0){TP_UP[i]=MA1[i];}else{TP_UPMin[i]=MA1[i];}
        if (MA2[i]<=0){TP_DN[i]=MA2[i];}else{TP_DNPl[i]=MA2[i];} 
             
//----
    old_price=price; 

//------

 if(NewBar())
      {
 
 MA1[i] = count_plus - sum_pip_bay;
 MA2[i] = count_minus - MathAbs(sum_pip_sell);
 
 //---- Условия на открытие сделки
 
 if (Sredn(TP_UP)>=2.5)OrderSend(Symbol(),OP_SELL,0.1,Close[i],2,50,20);
 if (Sredn(TP_DN)>=2.0)OrderSend(Symbol(),OP_BUY,0.1,Close[i],2,50,20);
 
       }
   }                    
   return(0);
}

//---- Функции
double Sredn(double ArrSr[])
{
double a=1,c,step=1/20;
for (int i=0;i<=20;i++)
{if (ArrSr[i]==0){a*=1;}else{a*=MathAbs(ArrSr[i]);}}
c=MathPow(a, step);
  return(c);
}
//-------------
bool NewBar()
{
   static datetime lastbar = 0;
   datetime curbar = Time[0];
   if(lastbar!=curbar)
   {
      lastbar=curbar;
      return (true);
   }
   else
   {
      return(false);
   }
} 

Files:
tiipi_exp.mq4  3 kb
Reason: