[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 946
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
Can you tell me if there is any way to speed up the process of testing a trading system? What does it depend on?
Yes, it can. But in this case the code should be optimized by speed
Yes, you can. But then you have to optimize the code by speed.
Optimise the code as in removing anything superfluous from it?
My code is the easiest, the model is all ticks, the history is 10 years old, it takes me about 10 minutes to run it
What if you just put a pending order at the stop level? Would that not work?
No, because the first position has a takeprofit and if it is reached, the second position becomes redundant.
I have it implemented in the following way - this is a condition - if the previous position closed with a loss, then opening the opposite one... If you need to open the opposite position exactly when the stop loss of the previous position is reached, then Kim Igor Vladimirovich has a function at https://www.mql5.com/go?link=http://www.kimiv.ru// that determines exactly how to close the order at the stop loss. So, when you connect this function, you should prescribe the condition if the pose was closed when the stop loss was reached. If it was, you should open another one.
PS: Just remembered, this closing fi code for a pose at stop loss was posted on this thread a few pages before... Have a look.
Thanks for the reply, I'll give it a try.
Can you tell me how to open a position on the second indicator signal?
I.e. when the first arrow appears on the indicator, we do not open a position, but open it when the second arrow appears.
I do so:
I have it implemented in the following way - this is a condition - if the previous position closed with a loss, then opening the opposite one... If you need to open the opposite position exactly when the stop loss of the previous position is reached, then Kim Igor Vladimirovich on https://www.mql5.com/go?link=http://www.kimiv.ru// has a function that determines exactly how the order is closed exactly by the stop loss. So, when you connect this function, you should prescribe the condition if the pose was closed when the stop loss was reached. If it was, you should open another one.
PS: Just remembered, this closing fi code for a pose at stop loss was posted on this thread a few pages before... Have a look.
Seems to work, but for some reason it opens two opposite positions.
Trying to implement a simple reversal. When a stop position is reached --> open the opposite position. I can't get it to open opposite position once and not open anything else. Please advise.
1. First determine that the previous pose is closed by the foot.
2. Then check the absence of already open the opposite position
And then, after you have determined it is not there yet - you open it (the opposite position that closed on stop).