[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

 
Can you tell me if there is any way to speed up the process of testing a trading system? What does it depend on?
 
T.H.C.:
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
 
Vinin:

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

 
sanyooooook:
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.
 
Roman.:

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:

 int  Sig=0;                     // Количество стрелок
  for(int i=1; i==Signal(); i++) // Цикл перебора стрелок
  {
   Sig++;                        // Счётчик стрелок
  if (Sig<2){return;}            // Не менее двух стрелок. Выход из start()
  }  
 
Can you tell me how to make the line (on chart_window) drawn from the buffer end not at the current bar but n number of bars into the future? How do I set the buffer to +1 +2 +3 bars?
 
Roman.:

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.
 
001:

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.

Logic is as simple as 2x2:
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).
 
Gentlemen! Can you tell me please! Is it possible to set a negative shift value in the code (if so, how?) in the indicator?
Reason: