Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 655

 
.roman.:

I have already checked these functions myself... That's why I said that I would need separate open charts for each timeframe I need (if functions with chart_id are used).

As the result, is there a solution, for example, to get rectangles' coordinates, which are located on other timeframes on the same chart but which are only visible on the timeframe they are on?

That is, the object is on the same chart, but only visible on TF H4 or D1, right?

Then chart_id = 0 and that's it, but I haven't had to look for a non-visible object on the chart yet, I don't know if it will be visible programmatically. But theoretically, if there is such property as OBJPROP_TIMEFRAMES with flags set, the object should be programmatically accessible on all TFs and therefore it's possible to read any of its properties.

Conclusion: The problem is not from chart_id, if you can't read the object properties, you have to find out other possible coding errors.

 
Hello) Wrote a problem to servicedesk.It's been a week.The status of the request is still the same: Open, Started: 2014.06.29 11:08, #1033758. Who knows, has it been forgotten or can we still hope for an answer?)
 
Megan:
Hello) Wrote a problem to servicedesk.It's been a week.The status of the request is still the same: Open, Started: 2014.06.29 11:08, #1033758. Who knows, has it been forgotten or can we still hope for an answer?)
Requests are supposedly sorted according to the principle of importance, recognized the important are executed in the first place. In addition there is an influence of the availability of programmers and the compliance of the request with the overall work plan.
Requests that are easy to handle in a week or so, but complex requests may take months. Some requests are not executed at all. Therefore, you should remind about it or submit a new request referring to a previous one after a month of waiting.
IMHO
 
granit77:
Requests are supposedly sorted according to their importance; those that are deemed important are executed first. In addition, it is also affected by the availability of programmers and the consistency of the application with the general work plan.
Requests that are easy to correct are resolved in about a week, complex requests may take months. Some requests are not executed at all. Therefore, you should remind about it or submit a new request referring to a previous one after a month of waiting.
IMHO

Thank you) we'll wait a month then...
 
simpleton:

Sometimes a return value and an error indicator can be combined. In cases where it makes sense to take some value as a sign of error. For example, an averaging price of 0.

Thank you!
 

Hello, dear friends.

I cannot find a way to run an indicator through an EA. i'm new to this. i need the program to open the indicator on the current chart on its own when i run it.

i need the indicator to open the current chart by itself.)

 

Hello! How to open SELLLIMIT and BUYLIMIT orders.

I'm opening it through a function, but it opens when it reaches a set price. How do I make it open at a given price?

/+----------------------------------------------------------------------------+
//|  Параметры:                                                                |
//|    sy - наименование инструмента   (NULL или "" - текущий символ)          |
//|    op - операция                                                           |
//|    ll - лот                                                                |
//|    pp - цена                                                               |
//|    sl - уровень стоп                                                       |
//|    tp - уровень тейк                                                       |
//|    mn - Magic Number                                                       |
//|    ex - Срок истечения                                                     |
//+----------------------------------------------------------------------------+
void SetOrder(string sy, int op, double ll, double pp,
              double sl=0, double tp=0, int mn=0, datetime ex=0) {
  color clOpen;
  int   err, ticket;
 
  if (sy=="" || sy=="0") sy=Symbol();
  if (op==OP_BUYLIMIT || op==OP_BUYSTOP || op==OP_BUYLIMIT || op==OP_SELLLIMIT) clOpen=clOpenBuy; else clOpen=clOpenSell;
  ticket=OrderSend(sy, op, ll, pp, Slippage, sl, tp, "", mn, ex, clOpen);
  if (ticket<0) {
    err=GetLastError();
    Print("Error(",err,") set ",GetNameOP(op),": ",ErrorDescription(err));
    Print("Ask=",Ask," Bid=",Bid," sy=",sy," ll=",ll,
          " pp=",pp," sl=",sl," tp=",tp," mn=",mn);
  }
}
 
waroder:

Hello, dear friends.

I cannot find a way to run an indicator through an EA. i'm new to this. i need the program to open the indicator on the current chart on its own when i run it.

i would appreciate your help in advance)

Returns value of the specified custom indicator

doubleiCustom(
stringsymbol,// symbol name
inttimeframe,// timeframe
stringname,//folder/user_name of custom indicator
... // list of the indicator input parameters
intmode,// data source
intshift// shift
);


double val=iCustom(NULL,0,"SampleInd",13,1,0);

 
waroder:

Hello, dear friends.

I cannot find a way to run an indicator through an EA. i'm new to this. i need the program to open the indicator on the current chart on its own when i run it.

i need the indicator to open the current chart by itself.)


The problem is not for beginners, to be honest. The program should save everything on the chart in a template, then add the required indicator with all its parameters to this template and load the new template back to the chart. The saving and loading of the template is possible by means of MQL, but for editing the template file you probably need to write a DLL, I am not sure that the custom script has access to writing the template files.
 
evillive:

The problem is not for beginners, to be honest. It is necessary to save everything on the chart in a template. Then you need to add to this template the required indicator with all parameters and load a new template back to the chart. The saving and loading of the template is possible by means of MQL, but for editing the template file you probably need to write a DLL, I am not sure that the custom script has access to writing the template files.

Operations with graphs

Functions for working with charts. All graph operations are applicable only to Expert Advisors and scripts.

The functions that set the chart properties actually serve to send to it the commands for changing. If these functions are executed successfully, the command gets to the general event queue of the chart. Modification of the chart is performed in the process of processing the event queue of the given chart.

For this reason, one should not expect immediate visual update of the chart after the call of the functions. In general, the chart is updated automatically by the terminal according to the events of changes - arrival of a new quote, changes in the chart window size, etc. For the forced update of the chart appearance, use the ChartRedraw() command.

Function

Action

ChartApplyTemplate

Applies to the specified chart a template from the specified file

ChartSaveTemplate

Saves the current chart settings to a template with the specified name

ChartWindowFind

Returns the number of the subwindow where the indicator is located

ChartTimePriceToXY

Converts the chart coordinates from time/price representation to X and Y coordinates

ChartXYToTimePrice

Converts the X and Y coordinates of the chart into time and price values

ChartOpen

Opens a new chart with the specified symbol and period

ChartFirst

Returns the chart ID that follows the specified one

ChartNext

Returns the ID of the first chart of the client terminal

ChartClose

Closes the specified chart

ChartSymbol

Returns the specified chart symbol name

ChartPeriod

Returns period value of the specified

Reason: