Thanks for updating the code.
If there is problem in my code, then wont I get the Error:Invalid Price with every order?
I'm using Slippage=3. Is it too high?
Got more or less the same Solution as you stated earlier.
If the code is ok i.e. Ask for Buying and Bid for Selling and other TP, SL etc. are on safe distance, then I should refreshrates with a pause to get the Actual Bid,Ask rate.
So will put like this and observe if I encounter this problem again or not. Also the Off Quotes one.
Could you please suggest the Shorter form of this for searching:
Any trade gone into even 1 cent of profit will be closed as soon as it's getting zero profit.
Is there any such function which doesn't use the pip distance, rather works on the amount of profit?
I am trying another thing. That is identifying a range of price. Like I have set Resistance and Support Levels and check whether the price is within this range or not.
So I've written this:
But after compiling getting a warning: Unsafe use of Type 'bool' in operation.
What the compiler is meaning by 'Unsafe' would you please explain a bit?
if(OpenPrice<=RH && OpenPrice>=RL)
Thanks. No warning is showing now.
By the way, I'm wanting to represent these ranges graphically in the chart like support,resistance lines or rectangular block.
I have been searching for such functions but not getting the right one.
Looked into this but couldn't get the idea of how to do it: