Download MetaTrader 5
To add comments, please log in or register
Thousands of developers have already published their products in the Market. Join them!
Alain Verleyen
Moderator
29639
Alain Verleyen 2014.04.30 18:10  
Arav007:


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?

Regards

Please search on the forum for "Invalid price error". Then if you can't deal with it, come again to ask.
Arav007
412
Arav007 2014.04.30 19:36  
angevoyageur:
Please search on the forum for "Invalid price error". Then if you can't deal with it, come again to ask.


Hello,

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?

Regards

Arav007
412
Arav007 2014.05.03 11:34  
angevoyageur:
Please search on the forum for "Invalid price error". Then if you can't deal with it, come again to ask.


Hello,

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:

if(RH>=OpenPrice>=RL)
{
 Range=true;
}

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?

Regards

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.05.03 11:45  
if(OpenPrice<=RH && OpenPrice>=RL)
Try splitting the condition.
Arav007
412
Arav007 2014.05.03 13:51  
deysmacro:
Try splitting the condition.


Hello,

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:

https://docs.mql4.com/objects/objectcreate

Regards

/ /12
To add comments, please log in or register