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

 
Zhunko:
So there's an example here.
So I asked what is a Subwindow Angle? [0-2]

 
ilunga:
Take a closer look at what the iCustom function returns
I see, type double... only it's not clear how do I get the colour value then?
 
Lisi4ka330:
I see, type double... only it's not clear how do I get the colour value then?
Why do you need a colour value? And what happens if you change it?
 
I don't need to change it, I need to open a position when the indicator (histogram) is green; close it when it is red....
 
nadya:
Why do you need a colour value? And what happens if you change it?
I don't need to change it, I need to open a position when the indicator (histogram) is green; close it when it is red....
 
Lisi4ka330:
I don't need to change it, I need to open a position when the indicator (histogram) is green; close it when it is red....
Is there no other way but to refer to the colour? Surely you know when your histogram is of one colour or another.
 
Hello, could you please tell me why the Bulls power and Bears power indicators applied to open are still re-drawn within one bar? For example the MA stays stationary =\
 
chief2000:
So I asked what is "Subwindow Angle"? [0-2]

Read carefully about this function. I didn't realise what it was. At first I thought it was the angle of the subwindow. But there are only 3 values and the coordinates are not in pixels. Not sure what it is.

=========

А! Got it! This is the number of the coordinate group.

time1 - Time of the first coordinate.
price1 - Price of the first coordinate.
time2 - Time for second co-ordinate.
price2 - Price of second co-ordinate.
time3 - Time for the third coordinate.
price3 - Price of the third co-ordinate.

 

Here is the code

  
static datetime OrderExpiriation;
int OrderDuration = 5;

  if(TimeHour(TimeCurrent()) == StartTime && TimeMinute(TimeCurrent()) == 0 && TimeSeconds(TimeCurrent()) == 0) // Если текущее время равно времени открытия ордеров, задается время истечения ордеров
    {
    OrderExpiriation = TimeCurrent() + 3600 * OrderDuration - 60;
    }


  for(int counter=0;counter<OrdersTotal();counter++)
    {
    if(OrderSelect(counter,SELECT_BY_POS,MODE_TRADES) == false) break;

    if(TimeCurrent() >= OrderExpiriation && OrderMagicNumber() == MagicNumber) //Если текущее время больше чем время истечения, удаляются ордера
      {
      int Ticket = OrderTicket();
      OrderDelete(Ticket);
      }
    }

In my case, it turns out that the current time is less than the expiry time, TimeCurrent() is less than OrderExpiriation, but the orders are still deleted. What is the error? I have been sitting here all day and cannot find it.

 
Zhunko:

Read carefully about this function. I didn't realise what it was. At first I thought it was the angle of the subwindow. But there are only 3 values and the coordinates are not in pixels. Not sure what it is.

=========

А! Got it! It's a coordinate group number.

time1 - Time of the first coordinate.
price1 - Price of the first coordinate.
time2 - Time for second coordinate.
price2 - Second coordinate price.
time3 - Time for the third coordinate.
price3 - Price of the third co-ordinate.


I'll check it out. Thank you!

Reason: