[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 629
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
I don't mean a test chart, but a chart of quotes, roughly, what changes in openings, closings?
there must be an error in the conditions / logic
Since MetaEditor doesn't have a debugger, this is what I do:
add at the end of the code
Comment( "flag= ", flag, " PrevFlag=", PrevFlag, ......);
return(0);
}
and in the visualization mode in the tester at low speed check what changes and what doesn't
Here is an interesting (for me of course ;)) problem-question:
Is it possible to make it so that when closing a position at trailing stop (position at profit) or at take profit, before closing this position to find a losing position, which has a loss in absolute value less than the profit of the profitable position being closed, to close it first, and then the profitable one. Is it possible?
Here is an interesting (for me of course ;)) problem-question:
Is it possible to make it so that when closing a position at trailing stop (position at profit) or at take profit, before closing this position to find a losing position, which has a loss in absolute value less than the profit of the profitable position being closed, to close it first, and then the profitable one. Is it possible?
I think you should write a function that will search through all orders by magic, put their profit into an array and then trivial sorting of the array will give you the required data
I think you have to write a function that will search all orders by magician, put their profit into array, and then the array sorting will give you the data you need.
Oooh... how messed up it is... Igor, you know I haven't made friends with arrays yet... :)
Although, as I understand it...
Oooh... how messed up it is... Igor, you know I haven't made friends with arrays yet... :)
I'll have to, though...
Arrays? How hard can it be? It's simpler than a variable! First, start with an array that's limited in the number of elements - a static array, and you'll learn about dynamic ones later
and think of them as having lots of variables, but with an index, like this
double mas[100] ;
and if you haven't worked with arrays, read as double mas1,mas2,mas3............
and then following the logic - zero the array, in the loop - i.e. initialize it, then put all your profits into the loop, then sort the array and finally in the first element mas[0] you will get maximum or minimum (depending on how you sorted) value of profit
Sorry, I didn't understand the question... Probably due to my inexperience in the depths of MT4
Artem, you are being hinted at secondary that life is boiling on the symbol chart and the tester report does not give the real picture and is often misleading. Open the chart after the end of the test and walk through each trade with a magnifying glass. You will discover a lot of interesting things.
Or are there more accessible and obvious methods of visual analysis?
I tried to use it for a week, but I failed to realize it. " I should place two buy and sell orders after 3 losing orders. Help me, I just can't get it to work!
Using Igor Kim's functions, it's quite realistic...
We define a variable, let's say double LossPose=0;
Then on every tick, we call the function that signals the loss of the last closed position. If it is true, then LossPose++;
If LossPose>=3 {open necessary positions}...
Enclosed is a complete list in Excel of useful functions written by Igor with descriptions and references to the source...