[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 231

 
Alex5757000 >> :
Colleagues, what can error 130 mean when trying to set a delay? I have to check the min. distance before setting it! I know you are not all psychics, but if I keep max distance 100%, what else can cause the error 130?

Deferrals with stops / takeovers? Why not post a piece of code with checks and placing an order?

 
Alex5757000 >> :
Colleagues, what can error 130 mean when trying to set a delay? I have to check the min. distance before I set it! I know you are not all psychics, but let's assume I keep 100% of the minimum distance. What else can cause the error 130?
In addition to the min stop level I added the spread in pips and everything started to work.
 
Alex5757000 >> :
To the minimum Stop Level distance I added more spread size in pips, and everything started working.

The fact that it's starting to work is good, but it's wrong :-).

Spread = Bid - Ask

.

Your price = Ask.

You do Your price + Spread = Ask + (Bid - Ask) = Bid

.

Conclusion: instead of Ascq, it should be Bid .

:-)

 
Alex5757000 >> :
I added the spread size in pips to the minimum Stop Level distance, and everything started working.

The fact that it's starting to work is good, but it's wrong :-).

Spread = Bid - Ask

.

Your price = Ask.

You do Your price + Spread = Ask + (Bid - Ask) = Bid

.

Conclusion: instead of Ascq, it should be Bid .

:-)

 
jartmailru >> :

The fact that it has started to work is good, but it's wrong :-).

Spread = Bid - Ask


How is it wrong?

The Ask is higher in value than the Bid.

So it should be Spread=Ask-Bid.

I have never included spread in my order closing calculations.

And I don't intend to... because there's no need for it...

;)

 
kombat >> :

How is that wrong?

The Ask is higher in value than the Bid.

So it should be spread=ask-bid.

I've never put a spread in the closing calculations.

And I don't intend to... because I don't need to...

;)

I didn't look carefully. You are right.

So, if my friend has added a spread, it should be Ask instead of Bid.

But that's the point - if you have to add or subtract the spread, there is no clarity with bid/ask.

 

The clarity is there. I was confused with that too at first.

To open Bai you need Ask price, and sootv. vice versa for Sell you need Bid.

Elementary...

int ticket=OrderSend(Symbol(),OP_BUY, Lots,Ask,3,0,0);
 

Good day to you all!


Can you tell me how to calculate the Profit Factor?

Maybe someone is also aware of the Sharp Ratio (Sharp)....

 

Good day)


I am coming back to you with a question. I avoided it for a long time due to my lack of understanding of pending orders in EAs, but finally I got stuck. I do not understand how to set price in pending order. What should I add instead of BID and ASK? Can I use any variable calculated before that? Then, how should I set this price so that it would pass later, when placing an order? I get a lot of errors saying that there is no such a price and so on.....


If you do not mind, you may explain your answer in code... All I did was digging around but it says so sideways...(((

 
Interesting писал(а) >>

Good day to you all!

Can you tell me how to calculate the Profit Factor?

Maybe someone else knows about the Sharp Ratio (Sharp)....

Look for Sharp Factor in the articles. 2.

Look for Rosh's post, there is a function.

Reason: