alpha430:
Heres a little problem that i have been experiencing for a long time but haven't bothered to find a solution until now.
My system is based on an hourly chart.
Now lets say my system opens a trade at 19:00 (time). and the TP (or SL) is hit at 21:00. There is no problems here (the TP / SL is hit 2 hours later).
but now lets instead say my system opens a trade at 19:00 and the TP is hit just 20 mins later at 19:20. What happens now is that my system will open another trade essentially the same as the one that was just closed. This is because my system calculates that all conditions (for OrderSend()) are still met and opens another trade (because we're still in the same hour the signal occured).
There is a very a simple way to overcome this, that is:
OrderSend();
Sleep(x);
but obviously sleep() doesnt work in a back test. so im getting seriously inaccurate testing .
How can i prevent my system from opening more than one trade in the same hour without using sleep()?
REALLY I CANT HELP BCOS I DONT KNOW. AM NEW. Heres a little problem that i have been experiencing for a long time but haven't bothered to find a solution until now.
My system is based on an hourly chart.
Now lets say my system opens a trade at 19:00 (time). and the TP (or SL) is hit at 21:00. There is no problems here (the TP / SL is hit 2 hours later).
but now lets instead say my system opens a trade at 19:00 and the TP is hit just 20 mins later at 19:20. What happens now is that my system will open another trade essentially the same as the one that was just closed. This is because my system calculates that all conditions (for OrderSend()) are still met and opens another trade (because we're still in the same hour the signal occured).
There is a very a simple way to overcome this, that is:
OrderSend();
Sleep(x);
but obviously sleep() doesnt work in a back test. so im getting seriously inaccurate testing .
How can i prevent my system from opening more than one trade in the same hour without using sleep()?
but maybe u can help me. i tried using the defaolt macd EA and made some chaanges. in back testing i got some results. but when i attached to my chart EUR/USD 15mins(demo) it isnt making any trades. even though the smiley is there. what am i not doing?pls PLs!
post your question in a new thread.
Can anyone help me with my question (post #1)?
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
Back-testing issue.
Heres a little problem that i have been experiencing for a long time but haven't bothered to find a solution until now.
My system is based on an hourly chart.
Now lets say my system opens a trade at 19:00 (time). and the TP (or SL) is hit at 21:00. There is no problems here (the TP / SL is hit 2 hours later).
but now lets instead say my system opens a trade at 19:00 and the TP is hit just 20 mins later at 19:20. What happens now is that my system will open another trade essentially the same as the one that was just closed. This is because my system calculates that all conditions (for OrderSend()) are still met and opens another trade (because we're still in the same hour the signal occured).
There is a very a simple way to overcome this, that is:
How can i prevent my system from opening more than one trade in the same hour without using sleep()?