I use my EA as a scanner and use ChartOpen Function to get the screened symbol, i want to use vertical lines and trend lines on those charts but i dont know how to get the chartID . i tried and it keeps getting added to my chart with the EA.
I use my EA as a scanner and use ChartOpen Function to get the screened symbol, i want to use vertical lines and trend lines on those charts but i dont know how to get the chartID . i tried and it keeps getting added to my chart with the EA.
i tried, but it will still draw lines on my chart with the EA, not the chart which just opened
If you are using the ChartOpen Function , you need to remember: this functionreturns the opened chart ID. It is this identifier that must be used to draw on a new chart.
ChartOpen
Opens a new chart with the specified symbol and period.
longChartOpen(
string symbol, // Symbol nameENUM_TIMEFRAMES period // Period
);
Parameters
symbol
[in] Chart symbol.NULLmeans the symbol of the current chart (the Expert Advisor is attached to).
period
[in] Chart period (timeframe). Can be one of theENUM_TIMEFRAMESvalues. 0 means the current chart period.
Return Value
If successful, it returns the opened chart ID. Otherwise returns 0.
Note
The maximum possible number of simultaneously open charts in the terminal can't exceed theCHARTS_MAXvalue.
If you are using the ChartOpen Function , you need to remember: this functionreturns the opened chart ID. It is this identifier that must be used to draw on a new chart.
I didn't think of that at all .it worked, thanks a lot !!
ChartOpen() returns a long value, How can i access that long value without executing the ChartOpen(). I am running a multi symbol and multi timeframe EA on loops
Ahmad861 : ChartOpen() returns a long value, How can i access that long value without executing the ChartOpen(). I am running a multi symbol and multi timeframe EA on loops
Use a styler - you will immediately see your error:
Example: short trade request form and full trade request form
Code: Buy Short code and Full code.mq5
Result
Hello, I need help identifying ChartID.
I use my EA as a scanner and use ChartOpen Function to get the screened symbol, i want to use vertical lines and trend lines on those charts but i dont know how to get the chartID . i tried and it keeps getting added to my chart with the EA.
Hello, I need help identifying ChartID.
I use my EA as a scanner and use ChartOpen Function to get the screened symbol, i want to use vertical lines and trend lines on those charts but i dont know how to get the chartID . i tried and it keeps getting added to my chart with the EA.
Use ChartID
Use ChartID
i tried, but it will still draw lines on my chart with the EA, not the chart which just opened
i tried, but it will still draw lines on my chart with the EA, not the chart which just opened
If you are using the ChartOpen Function , you need to remember: this function returns the opened chart ID. It is this identifier that must be used to draw on a new chart.
ChartOpen
Parameters
Return Value
Note
If you are using the ChartOpen Function , you need to remember: this function returns the opened chart ID. It is this identifier that must be used to draw on a new chart.
I didn't think of that at all .it worked, thanks a lot !!
Calculate Positions and Pending Orders
Code: Calculate Positions and Pending Orders.mq5
Open positions: GBPUSD BUY 0.03 lot and USDPLN SELL 0.01
Pending orders are placed: USDPLN Sell limit 0.01 and GBPUSD Buy limit 0.03
ChartOpen() returns a long value, How can i access that long value without executing the ChartOpen(). I am running a multi symbol and multi timeframe EA on loops
Use a styler - you will immediately see your error:
Use a styler - you will immediately see your error:
i do not understand, What do you mean ?