What is the difference between ticket number 2 and ticket number 3 if it is only one buy or sell that can meet conditionals within a daily time frame
Look at history deals, pay attention to the direction of the deal.
Orders, Positions and and Deals are totally independent of time-frame.
Positions do not have an expiration time/date and remain open until:
- their stops are triggered, or
- they are closed by the trader, or
- closed by broker (e.g. margin stop-out).
Orders, Positions and and Deals are totally independent of time-frame.
Positions do not have an expiration time/date and remain open until:
- their stops are triggered, or
- they are closed by the trader, or
- closed by broker (e.g. margin stop-out).
My script doesn't mention their closing and it hasn't hit my stop loss. What else causes an open position to close? Thank you for all your wisdom!
Orders, Positions and and Deals are totally independent of time-frame.
Positions do not have an expiration time/date and remain open until:
- their stops are triggered, or
- they are closed by the trader, or
- closed by broker (e.g. margin stop-out).
If the closing of a position is independent to time, the how come does the timing of the positions closing correspond to the time frame used on the bar?
I have tested on both a one minute time frame.
static datetime dtBarCurrentOneMinute = WRONG_VALUE; datetime dtBarPreviousOneMinute = dtBarCurrentOneMinute; dtBarCurrentOneMinute = iTime(_Symbol,PERIOD_M1, 0); bool bNewBarEventOneMinute = (dtBarCurrentOneMinute != dtBarPreviousOneMinute); if(bNewBarEventOneMinute) {
Here is the one hour one
static datetime dtBarCurrentOneMinute = WRONG_VALUE; datetime dtBarPreviousOneMinute = dtBarCurrentOneMinute; dtBarCurrentOneMinute = iTime(_Symbol,PERIOD_H1, 0); bool bNewBarEventOneMinute = (dtBarCurrentOneMinute != dtBarPreviousOneMinute); if(bNewBarEventOneMinute) {
As seen in the screenshot each one closes the short position according to the time frame of the bar, so how then can the closing of a position be independent of what time frame is being used?
Probably because your EA is closing/reversing the position on a "timely" fashion based on the time-frame.
I have already advised you multiple times for you to start with a small and simple project so that you can properly learn the platform's functionality and the programming language.
However, since you continue to reject the advice, this will be my last post on any of your topics.
Probably because your EA is closing/reversing the position on a "timely" fashion based on the time-frame.
I have already advised you multiple times for you to start with a small and simple project so that you can properly learn the platform's functionality and the programming language.
However, since you continue to reject the advice, this will be my last post on any of your topics.
I resolved the issue, it's quiet funny how easy and simple coding is. It's always a small issue, lol.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi! I have an EA that only submits one short or long trade every daily time frame, I see when running a back test this EA submits a single short trade but then attached to it is also a buy order. How is a buy order possible if the EA is coded to only allow one long or short trade per day?