nothere:
Hello:
Could you please take a look at the following EA, and let me know what modifications I need to make to have it only enter a trade once per bar? (I run this on the 1H or 4H Time frame)
Regards
Not Here.
Hello:
Could you please take a look at the following EA, and let me know what modifications I need to make to have it only enter a trade once per bar? (I run this on the 1H or 4H Time frame)
Regards
Not Here.
datetime Time0 = 0; void start() { if (Time0 != Time[0]) { OrderSend(... Time[0] = Time[0]; } }MQL How-To Guide
RickD:
Shouldn't this be: datetime Time0 = 0; void start() { if (Time0 != Time[0]) { OrderSend(... Time[0] = Time[0]; } }MQL How-To Guide
Time0 = Time[0]As written, Time0 gets never updated and the test will always be true.
Hello:
Thanks for you replies RICKD and ZUIJLEN, I appreciate them!!
I am going to try both methods to see the result.
it is important to make sure the trade happens only once per hour, because the backtester is UNRELIABLE otherwise.
Best regards to both!!!
NOT HERE.......
Thanks for you replies RICKD and ZUIJLEN, I appreciate them!!
I am going to try both methods to see the result.
it is important to make sure the trade happens only once per hour, because the backtester is UNRELIABLE otherwise.
Best regards to both!!!
NOT HERE.......
nothere:
it is important to make sure the trade happens only once per hour, because the backtester is UNRELIABLE otherwise.
You need to read Strategy Tester: Modes of Modeling during Testing and My First "Grail"
it is important to make sure the trade happens only once per hour, because the backtester is UNRELIABLE otherwise.
Hello Rosh:
Thanks for the pointers, but I have already read these docs.
Having read the documets you point out, and many others related to this and many other backtesters, has led me to have the opinion I expressed above, which remains unchanged.
I use backtesters only to have a general idea about the way the algorithm behaves under test conditions, not to equate backtesting performance to forward or out of sample performance.
Thanks!!!
Thanks for the pointers, but I have already read these docs.
Having read the documets you point out, and many others related to this and many other backtesters, has led me to have the opinion I expressed above, which remains unchanged.
I use backtesters only to have a general idea about the way the algorithm behaves under test conditions, not to equate backtesting performance to forward or out of sample performance.
Thanks!!!
Resolved, thanks!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Could you please take a look at the following EA, and let me know what modifications I need to make to have it only enter a trade once per bar? (I run this on the 1H or 4H Time frame)
When back tested, the code enters more than one trade per bar, but I know that is not a good test, as the tester is only "guesstimating" what happened within the bar.
Also, I need to make sure it enters a trade when the signals trigger, even if there is slippage or slow trading context or slow response from broker (as per usual).
Any help will be greatly appreciated.
Regards
Not Here.