Now the symbol-" USDJPY " price is as below:
I execute the below codes in my EA:
1. OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,0,0,0,Red); succeed
2. Ordersend(Symbol(),OP_BUY,Lots,Close,3,0,0,0,0,0,Red); fail
3. OrderSend(Symbol(),OP_BUY,Lots,Ask+2*Point,3,0,0,0,0,0,Red); fail
my questions are below:
1. I don;t know why "1" can succed but "3" failed? and how / what shall I modify to make "2" succeed, the slippage can work a little?
2. Close is always equal to bid, why?
3. bid / ask spread sometime is 2 points, sometime is 1 point / 3 points, why?
2. Close is always equal to bid, why? Thats false. This is why I give you the first Link.
Op_Buy is looking for "ask: 95.84"____Not 95.84+2*Point.____Not 95.8400000001. <-- This is what Close could look like in double precision. Sigh.
thanks. in the fact my purpose is that regarding to "OrderSend(Symbol(),tradetype,Lots,XXX,3,0,0,0,0,0,Red); ", whether there is an good price XXX which can make me just change tradetype to send order without considering OP_BUY or OP_SELL.
If there is not, that is Ok, I know.
Op_Buy is looking for "ask: 95.84"____Not 95.84+2*Point.____Not 95.8400000001. <-- This is what Close would look like in double precision. Sigh.
3. if OP_Buy is just looking for "ask", i think the "price" in function "ordersend()" can be deleted when "cmd" is OP_buy or OP_sell.
in addition, what is the "slippage" 's meaning and when and how it work?
thanks a lot?
1) That could be True. I've never tried it. Try it and see if it compiles.
2) Slippage. slippage is the maximum allowed deviation of the requested order open price from the market price for market orders (points). This parameter is not processed for placing of pending orders.
More. And More. Try finding answers by searching.
thank you very much and you are so nice
i have other questions for you haha
1. Now I show a script code as below:
#property copyright "Copyright 2013, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
extern string My_Name;
Print("my name is :",My_Name);
I want to use this script to print "my name is ABC" for the first time , "my name is XYZ" for the second time and other something for the next time; I mean "ABC" and "XYZ" should be assigned to My_Name by me when the script is executing rather than written into the codes in advance. How shall I? I need the very details, thanks.
2. I mean whether I can create an EA which can execute the above script to print "My_Name" just like that the EA calls other functions, such as ordersend() and so on? I hope I have clear my meaning.
You have to enter a Different name every time.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.