Tried the above statement but got error.
I want to know if I want to display the values according to the Close price and my bid and ask prices are different then how I can set the custom chart mode to close price instead of bid or ask prices.
Please let me know.
The problem you are encountering is that the SYMBOL_CHART_MODE identifier only has two options (click on ENUM_SYMBOL_CHART_MODE for the SYMBOL_CHART_MODE identifier). You can either display prices by bid or by the latest price by specifying them with 0 and 1 or SYMBOL_CHART_MODE_BID and SYMBOL_CHART_MODE_LAST respectively in the CustomSymbolSetDouble function you are using.
Therefore, when you specify the parameter set as 3, it's returning an error, because that there is no enumerations with the the parameter 3. When you click Close price link, you will see that it refers to the ENUM_APPLIED_PRICE enumerations, which are used for setting the calculation price to be used for indicators, and not for the SYMBOL_CHART_MODE identifier.
I don't know if you can set the SYMBOL_CHART_MODE of predefined symbols, but it might be worth a try. Here is the line of code you should use to test this:
CustomSymbolSetDouble(Symbol(),SYMBOL_CHART_MODE,SYMBOL_CHART_MODE_LAST);
Hope this helps!
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Tried the above statement but got error.
I want to know if I want to display the values according to the Close price and my bid and ask prices are different then how I can set the custom chart mode to close price instead of bid or ask prices.
Please let me know.