Can you tell me please: after testing on the history, is there any way to get the comment or magic number of each trade made, or any other way to identify the trades? Let me try to explain the meaning. Suppose I programmed a few patterns and ran the EA on the history, the result, as it often happens, is loss. It would be interesting to see, which of the patterns and under what market conditions is losing more and more often, and which (if any) shows at least some profit.
Thanks in advance for the answers.
Make it simple. Set the pattern number as an extern parameter. The Expert Advisor should open positions only by this pattern. And if you specify zero, for example, it opens by any pattern. You run optimization by all patterns. You get the summary picture and pattern breakdown.
A "New Order" function like "New Bar" is needed. The function should have TRUE value only for one tick after the moment when the order was opened. I.e. at the moment when the number of open orders changes upwards. Please help me
there is such a problem - i had this problem too, if the Expert Advisor makes many trades per year - perhaps too much data is stored for the output of the final result or maybe the indicator buffers eat the memory
i have seen - i don't know, bear with me - for a general picture, the test is for 10 years, and it's better to optimize for one year and then make a selection of the best parameters
Thank you Igor! Intuitively I am doing so. Thought it might be possible for a longer period not to lose speed as well ?
Gurus please advise, I've already racked my brains, I feel it should be easy, I've tried it both ways... I can't...
The essence of the problem:
I am writing an indicator, it catches points in the buffers, in total there should be 4, 2 assembled normally, the values as they should be by bars, either zero or, price, here everything is OK, but we need 2 more buffers in which to put values in this way: if a non-zero value is found for buffer 0, then check whether the previous non-zero value in buffer 0, and if it is less, then the current value is written to buffer 2. I want it to be calculated on the fly, not by searching and looping, it's my first indicator, I've written Expert Advisors and scripts, but I lost my way with indicator and its buffers...
...................
Counted_bars=IndicatorCounted(); // Number of calculated bars
i=Bars-Counted_bars-1; // Index of the first one not counted
Gurus please advise, I've already racked my brains, I feel it should be easy, I've tried it both ways... I can't...
The essence of the problem:
I am writing an indicator, it catches points in the buffers, in total there should be 4, 2 assembled normally, the values as they should be by bars, either zero or, price, here everything is OK, but we need 2 more buffers in which to put values in this way: if a non-zero value is found for buffer 0, then check whether the previous non-zero value in buffer 0, and if it is less, then the current value is written to buffer 2. I want it to be calculated on the fly, not by searching and looping, it's my first indicator, I've written Expert Advisors and scripts, but I lost my way with indicator and its buffers...
...................
Counted_bars=IndicatorCounted(); // Number of calculated bars
i=Bars-Counted_bars-1; // Index of the first one not counted
Can anyone tell me what the problem is?
Until we have the indicator itself, no one will tell us.
It is possible. If of course the brokerage company supports it.
Just keep in mind that in the tester you can open positions in the current instrument, and there are some restrictions on other instruments
Does this series of restrictions apply to online trading? If not, it's sad. The code doesn't open anything:
Hi all.
Can you tell me please: after testing on the history, is there any way to get the comment or magic number of each trade made, or any other way to identify the trades? Let me try to explain the meaning. Suppose I programmed a few patterns and ran the EA on the history, the result, as it often happens, is loss. It would be interesting to see, which of the patterns and under what market conditions is losing more and more often, and which (if any) shows at least some profit.
Thanks in advance for the answers.
is there an override of historical orders?
there is such a problem - i had this problem too, if the Expert Advisor makes many trades per year - perhaps too much data is stored for the output of the final result or maybe the indicator buffers eat the memory
i have seen - i don't know, bear with me - for a general picture, the test is for 10 years, and it's better to optimize for one year and then make a selection of the best parameters
Gurus please advise, I've already racked my brains, I feel it should be easy, I've tried it both ways... I can't...
The essence of the problem:
I am writing an indicator, it catches points in the buffers, in total there should be 4, 2 assembled normally, the values as they should be by bars, either zero or, price, here everything is OK, but we need 2 more buffers in which to put values in this way: if a non-zero value is found for buffer 0, then check whether the previous non-zero value in buffer 0, and if it is less, then the current value is written to buffer 2. I want it to be calculated on the fly, not by searching and looping, it's my first indicator, I've written Expert Advisors and scripts, but I lost my way with indicator and its buffers...
...................
Counted_bars=IndicatorCounted(); // Number of calculated bars
i=Bars-Counted_bars-1; // Index of the first one not counted
while(i>1) // Loop on uncounted bars
{
if (..............) // everything works here
{
Buf_0[i]=High[i];
{ here we want to calculate Buf_2[i] }
}
if (..............) //everything works here too
{
Buf_1[i]=Low[i];
{but here we want to calculate Buf_3[i] }
}
i--;
//calculate index of the next bar
}
//--------------------------------------------------------------------
return; // Exit special function start()
}
//--------------------------------------------------------------------
Gurus please advise, I've already racked my brains, I feel it should be easy, I've tried it both ways... I can't...
The essence of the problem:
I am writing an indicator, it catches points in the buffers, in total there should be 4, 2 assembled normally, the values as they should be by bars, either zero or, price, here everything is OK, but we need 2 more buffers in which to put values in this way: if a non-zero value is found for buffer 0, then check whether the previous non-zero value in buffer 0, and if it is less, then the current value is written to buffer 2. I want it to be calculated on the fly, not by searching and looping, it's my first indicator, I've written Expert Advisors and scripts, but I lost my way with indicator and its buffers...
...................
Counted_bars=IndicatorCounted(); // Number of calculated bars
i=Bars-Counted_bars-1; // Index of the first one not counted
while(i>1) // Loop on uncounted bars
{
if (..............) // everything works here
{
Buf_0[i]=High[i];
{ here we want to calculate Buf_2[i] }
}
if (..............) //everything works here too
{
Buf_1[i]=Low[i];
{but here we want to calculate Buf_3[i] }
}
i--;
//calculate index of the next bar
}
//--------------------------------------------------------------------
return; // Exit special function start()
}
//--------------------------------------------------------------------
What happens more often - buy or sell? Meaning globally.