[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 305
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
1. If there is a closed takeout position, ...
1.1 If its type is OP_BUY, ...
1.1.2 If there is an open position OP_SELL, ....
1.1.3 If the current bar time minus the open Sell position time is greater than or equal to the number of bars for a delay, ...
1.1.4 Close a Sell position
1.2 If its type is OP_SELL, ...
1.2.2 If there is an open position OP_BUY, ...
1.2.3 If the current bar time minus the Buy position open time is greater than or equal to the number of bars for a delay, ...
1.2.4. we close the Buy position
Thanks for the algorithm, it is much more complicated than I expected(
Could you please sketch the code in general, because it took me so long to write the previous one, but I couldn't find similar EAs....
I cannot find similar EAs, but I would be very grateful!
You can find a lot of similar functions here - Useful functions from KimIV. There's also a ready-made one for your task.
Hello.
Please help me to find an error. The code counts the sum of RangeX0_D1 values
The result is only the last (sixth) member of the sequence.
Thank you in advance.
Thanks for your help, accuracy and speed :)
To speed up calculations, it is better to do things a little differently
Dividing takes a long time. It's better to do it once.
Good afternoon, some advice: The loop searches for values that satisfy certain conditions. The found values are written to an array. It is not known in advance how many values will be found. Therefore, the size of the array to be declared is unknown. From the point of view of time and resources, I'd rather not make two runs (so that I could count the number of found values in the first run, declare the array and write data into the array in the second one). Is there any way to get the required result in one run?
An "infinite" length array can be declared in the indicator. Declare it and then in the loop immediately write the values found in the array. The only question is how to transfer the necessary selection to the Expert Advisor/Script? There are some tools, but we need to assess the complexity. Maybe it would really be easier to do 2 runs - in the first one, we count the number of filtered values, then change the dimension of the array, and in the second one, we enter the values into the array?
Good afternoon, some advice: The loop searches for values that satisfy certain conditions. The found values are written to an array. It is not known in advance how many values will be found. Therefore, the size of the array to be declared is unknown. From the point of view of time and resources, I'd rather not make two runs (so that I could count the number of found values in the first run, declare the array and write data into the array in the second one). Is there any way to get the required result in one run?
Declare the array larger than the maximum required size.