SymbolInfoDouble(_Symbol,SYMBOL_ASK)
For me they are the same.
Note that the tick that you use to draw the lines on chart are already expired. Depending on your broker this might cause problem. Although I find it very strange.
I think you should share your code. Maybe there is a problem in there.
Hey guys,
Can anyone tell me how I get the bid and ask prices of the inner lines?
I need that to place my trades correctly with an EA.
This part is in OnInit():
ObjectCreate(0,"bidLine",OBJ_HLINE,0,0,SymbolInfoDouble(_Symbol,SYMBOL_BID)); ObjectSetInteger(0,"bidLine",OBJPROP_WIDTH,1); ObjectSetInteger(0,"bidLine",OBJPROP_STYLE,STYLE_DOT); ObjectSetInteger(0,"bidLine",OBJPROP_COLOR,clrBlack); ObjectSetInteger(0,"bidLine",OBJPROP_SELECTABLE,false); ObjectCreate(0,"askLine",OBJ_HLINE,0,0,SymbolInfoDouble(_Symbol,SYMBOL_ASK)); ObjectSetInteger(0,"askLine",OBJPROP_WIDTH,1); ObjectSetInteger(0,"askLine",OBJPROP_STYLE,STYLE_DOT); ObjectSetInteger(0,"askLine",OBJPROP_COLOR,clrBlack); ObjectSetInteger(0,"askLine",OBJPROP_SELECTABLE,false);
And this is in OnTick():
ObjectSetDouble(0,"bidLine",OBJPROP_PRICE,SymbolInfoDouble(_Symbol,SYMBOL_BID)); ObjectSetDouble(0,"askLine",OBJPROP_PRICE,SymbolInfoDouble(_Symbol,SYMBOL_ASK));
Hey guys,
Can anyone tell me how I get the bid and ask prices of the inner lines?
I need that to place my trades correctly with an EA.
Guys, I think here is a big misunderstanding.
Everything works fine in my code with the dotted lines. These lines represent the values I receive from SymbolInfoDouble().
But you can see that the other lines have different values. These lines are activated by the checkboxes in the chart settings.
I just wanted to know IF I can get the values of these bid and ask lines somehow.
You are doing something that is not required. Just use the built in chart display for bid and ask then you won’t have a problem
The solid lines are the built in lines for bid and ask. But I need the values of them in my code. And my question was how I can get them. They are not the same values I receive with SymbolInfoDouble().
For me they are the same.
Note that the tick that you use to draw the lines on chart are already expired. Depending on your broker this might cause problem. Although I find it very strange.
I think you should share your code. Maybe there is a problem in there.
My broker adds around 5 points to each side of the spread which is displayed by the solid lines.
My broker adds around 5 points to each side of the spread which is displayed by the solid lines.
there is no inner spread, only that shown by your solid lines. You are clearly calling out of date information, refresh the prices before you get them, and redraw the chart if you are updating objects
there is no inner spread, only that shown by your solid lines. You are clearly calling out of date information, refresh the prices before you get them, and redraw the chart if you are updating objects
Yes, I know there is no real "inner spread" and that's why I put into "". I don't know how I should name it otherwise. I just wanted to explain that my tradable spread and the spread which is shown in the built-in chart function of MT are different.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Can anyone tell me how I get the bid and ask prices of the inner lines?
I need that to place my trades correctly with an EA.