[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 425
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Is there any way to make not more than one order open on the current bar? That is, I need one order to be opened on the current fractal, but no more than that, and on the next one, etc.
Can it be done somehow?
Yes, it is possible. There is only a double question. If we open on the current bar, it is the zero bar. And the fractal is formed at least on the second one.
Save the time of the fractal bar in the variable and, if a position has already been opened for this fractal with such a time, do not open more positions with it. As soon as a new fractal is formed, its bar time will change and then open a new position and, after its successful opening, store the new fractal time in the variable.
I don't mean to be intrusive. Help with my question. Can't close an order. It's giving me an error with the wrong ticket. The problem is in the ticket, how do I call it and close the order? How do I close a ticket? Thank you.
I am writing my EA in a way that sell is opened after buy and vice versa, but for some reason only the first order is closed and the others are not.
OrderSend(Symbol(),OP_SELL,1,Bid,3,0,0,NULL,12345,CLR_Blue);
Makes an error, wrong ticket. The problem is in the ticket, how do I call it and close the order? Thank you.
Hello! In the window on which the EA is attached, how do I display the red Right price marker of the opening price of that order, on the bar on which it opened?
I don't mean to be intrusive. Help with my question. Can't close an order. It's giving me an error with the wrong ticket. The problem is in the ticket, how do I call it and close the order? How do I close a ticket? Thank you.
I am writing my EA in a way that sell is opened after buy and vice versa, but for some reason only the first order is closed and the others are not.
OrderSend(Symbol(),OP_SELL,1,Bid,3,0,0,NULL,12345,CLR_Blue);
I got an error with a wrong ticket. The issue is in the ticket, how do I call it and close the order? Thank you.
You are missing an expiry option (highlighted in red)
Do you want to open a Sell position when you close a Buy position and vice versa?
In the list of closed orders, find the last closed order, view its type and open the opposite one.
To close an order, you must first select it, take its ticket and close it.
Hi! How do I display the red Right price marker of the opening price of that order, on the window where the EA is attached, as the SELL market order opened?
bool ObjectCreate( string name, int type, int window, datetime time1, double price1, datetime time2=0, double price2=0, datetime time3=0,double price3=0)
Creates an object with the specified name, type and initial coordinates in the specified sub-window of the graph. The number of coordinates associated with the object can be from 1 to 3 depending on the type. The function returns TRUE if the object is created successfully, otherwise FALSE. To get more information about the error, call the GetLastError() function.Objects of type OBJ_LABEL ignore the coordinates. Use ObjectSet() to set the OBJPROP_XDISTANCE and OBJPROP_YDISTANCE properties.
Notes: The chart subwindows (if there are any indicator subwindows in the chart) are numbered starting from 1. The main chart subwindow is always present and has the index 0.
Coordinates must be passed in pairs - time and price. For example, the OBJ_VLINE object only needs time, but the price (any value) must also be passed.
artmedia70:
You can. Only the question is twofold. If you open on the current bar, it is zero bar. And the fractal is formed at least on the second bar.
Save the bar time of the fractal bar in the variable and, if that fractal has already been opened with that time, do not open another position with it. As soon as a new fractal is formed, its bar time will change and you open a new position and, after its successful opening, store the new fractal time in the variable.
How can I save it, into a global variable? I have created a simple variable, but it seems it is not saved and the orders keep opening. See
Variable opentime
I would like to ask somebody to help me please.
I even tried to make the variable global, but it still opens many trades, as if the variable is reset every time.
Please advise how to deal with a trivial problem - I have a hole in EUR history for June 2011 and then September and a bit of September is lost
in the \terminal\history\downloads\EURUSD folder there are these files
EURUSD_2011_06_81625bcefc91bf488a04d5a1dae0c93f
EURUSD_2011_09_2557787db3eb2fe87073c783f21cdd66
EURUSD_2011_10_15793a4a4f9d001b78a82e248872bc3b
I tried several terminals from different brokers, including native MQ. I also tried it on different machines with XP and Win7. Tried deleting symbols.raw and symgroups.raw and downloading them again - did not help.
I wonder if it is crucial for you to have a history of this particular period?
What do you think? Since I'm asking, yes!
How do I save it to a global variable? I made a regular variable, but it doesn't seem to be saved and the orders keep opening. Here is
Variable opentime
I am trying to make this variable global.
I even tried to make the variable global, but it still opens a lot of trades, as if the variable is reset every time.