thanks, will give it a try!!!
53056:
get the Order Open Time - OOT - (in seconds),
- get the current time - Bar 0,
- Subtract the next bar time value (say it is 15 min chart and next candle value is the 45 minute candle) form the current TimeMinute value. Let say it is 2 minutes and 25 seconds before the next Bar starts, thus the value will be 145 (seconds).
- get the Timecurrent() value and add the 145 seconds to it = Bar_check_value.
- do math calc and see how many 900 seconds (15 x 60 = 900) intervals the current time is away from the OOT.
- that's how many bars away from the OOT.
Isn't there an easier way?
Any other ideas?
I made a sessions Indy which coincidentally fits your need. It's simplifies datetime operations greatly. Perhaps you can use the solution for your EA, I commented it with lots of explanation in case needed.
HTH
Hi everyone,
I have a question that can we open opposite position on the same pair. If not, what would happened if we run two different ea bots on the same pair and they triggered opposite positions?
NFA
Enforces FIFO Rule, Bans Forex Hedging in US Forex Accounts - Trading Heroes
FAQ:
FIFO in the Forex Market - BabyPips.com
Hi everyone,
I have a question that can we open opposite position on the same pair. If not, what would happened if we run two different ea bots on the same pair and they triggered opposite positions?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello there
My EA requires counting the bars after an order has opened (measure MACD values against a 'sloping' (changing) value (not the signal)).
This is what i thought (my problem):
datetime OOT=OrderOpenTime();
Isn't there an easier way?
Any other ideas?