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

 
Falmera:
Can you show me an example? true False doesn't mean anything to me

"true False doesn't mean anything to me"...

bool Flag;

int start()
{
   ...
   
   if (!Flag && Open[1] >  Open[2]+10*Point)
   {
      Flag = True;
      OrderSend(...);
   }
   
   if ( Flag && Open[1] <= Open[2]+10*Point)
      Flag = False;

   ...
}
In this example it is possible to work by closing the bar. But I think it would be more illustrative that way.
 
ikatsko:

How do you advise you can figure it out? Or how to refer to an earlier history than Bars?

I have a library that works with timeseries directly from files, bypassing MT4. It's all there. But it is not free.

T-G:

T-G:
I have never downloaded this plug from composter but I have never downloaded it from compuster.
Anyways, what is the best script or advisor to collect ticks?

I have a few questions, can someone give me an answer?
My complex. It's not a freebie either. Described it in this thread above.


 
Question: why does it work with EURUSD or GBPUSD, for example, where the price is one decimal place, but not with 2 or more decimal places like EURJPY or USDJPY?
 
LuRAS:
Question: why does it work with EURUSD or GBPUSD, for example, where the price is one decimal place, but not with 2 or more decimal places like EURJPY or USDJPY?
This is a question for the indicator.
 
MaxZ:

"true False doesn't mean anything to me"...

In this example, you can work from the bar closing. But I think it's more illustrative that way.

did not help! Still opens a lot of orders
 
Falmera:

did not help! Still opens a bunch of orders.
Get me the code. Or the pay per hour will go up. Telepath services are very expensive these days...
 
MaxZ:
The code in a studio. Or the pay per hour will go up. Telepath services are very expensive these days...


what's the code? there is no code as such!

int total;
total = OrdersTotal();

for(int cnt=0;cnt<total;cnt++){
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if(OrderType()==OP_BUY){
if(OrderSymbol()==Symbol(){
if(OrderMagicNumber()==Magic){
if (Bid < OrderOpenPrice() - Shag * Point){
OrderSend(Symbol(),OP_BUY.......pam-pam-pam

}
}
}
}
return(0);
}

if (total <1){
OrderSend(Symbol(),OP_BUY,Lot,Ask,3,0,0, "buy",Magic,NULL,Green);
}

Here's how to do it?

 
Falmera:


what is the code? there is no code as such!

So what to do?

I don't see a checkbox... :( I don't see your understanding of my proposed approach...

And please attach the code via the "SRC" button or CTRL+ALT+M...

 
MaxZ:

I don't see the checkbox... :( I don't see your understanding of my proposed approach...

And please attach the code via the "SRC" button or CTRL+ALT+M...

if (!Flag){
for(int cnt=0;cnt<total;cnt++){
   OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
      if(OrderType()==OP_BUY){
         if(OrderSymbol()==Symbol()){
            if(OrderMagicNumber()==Magic){
             if (Bid < OrderOpenPrice() - Shag * Point){             
               Flag = True;
               OrderSend(Symbol(),OP_BUY.. 
               
               }
            }
         }
      }
   }
Flag = False;
}
 
Falmera:


What's the code? There is no code as such!

int total;
total = OrdersTotal();

1 for(int cnt=0;cnt<total;cnt++){
2  OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
3  if(OrderType()==OP_BUY){
4     if(OrderSymbol()==Symbol()){
5        if(OrderMagicNumber()==Magic){
6           if (Bid < OrderOpenPrice() - Shag * Point){  
7              OrderSend(Symbol(),OP_BUY.......прам-пам-пам
               }
           }
        }
     }
  return(0);
}
if (total <1){  OrderSend(Symbol(),OP_BUY,Lot,Ask,3,0,0,"buy",Magic,NULL,Green);}

So what should we do?

So, we have 1 order. Let us assume it is set at 20, the current price is 10 and the step is 9

1. loop through all the orders

2. order has been selected

3, 4, 5 - property check

If the price has left (and it has), then

7. place the order

the orders now became 2. The tick came but the first order was at the level of 20, now the price is 9.5 and the step is 9.

So again 1-7 and one more order

and so on till the moment the deposit is blue in the face

Reason: