[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 588
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
Tell me where to find programmers who write EAs!
You also have to control the timing of the bar opening:
Tell me where to find programmers who write EAs!
...
3. fill the array for(i=1;i<=PerB;i++) MyATR[i-1]=(High[i]-Low[i])/Low[i]; index i starts from 1 as we need only closed bars
...
check it out, maybe it's just an errorOk thanks, I will try it in the morning (my head is not good right now), but in this case (i=1) i will be able to refer to Open [0] price of the current bar?
P. S. Ok, I think I've got the gist - I'll try it in the afternoon.
OK, I'll try, but in this case (i=1) I will be able to refer to the Open price of the current bar Open[0]&
Didn't hold out until the morning. It got a little better, but the order bloom placements could not be avoided. How can I set up a single order at the required condition? You mentioned: No, that would not work. Only through order history analysis - how can we do that or what else is suitable?
You also have to control the timing of the bar opening:
I would be glad to help!
Please tell me, I am trying to write an EA. I should place a new order when the old one is closed by tp or sl.
I would appreciate it!
You need to separately insert (copy) into the code (outside of the Start) f-i that indicate how the last position was closed.
These are available at: https: //www.mql5.com/ru/forum/107476
pg. 21
The function isCloseLastPosByTake().
This function returns a flag to close the last position by Take. The flag is raised - True - TakeProfit has triggered. Flag lowered - False - position was closed for another reason
The isCloseLastPosByStop() function. This function returns a flag to close the last position by stop. Flag is up - True - StopLoss triggered. Flag lowered - False - position was closed for other reason
-------------------
Most likely, this will also require a f-type:
GetTypeLastClosePos() function. Page 20
This function returns the type of the last closed position or -1
=================================
Then, in the simplest case, the - The opening conditions would be :
//--------------Для бай-сделок-------------
if ( isCloseLastPosByTake(NULL, OP_BUY, -1)==true || isCloseLastPosByStop(NULL, OP_BUY, -1)==true) {
//if the last buy position has closed at take or stop, a new buy position will be opened
/------------
Same for sell trades ....
Please tell me how experienced wizards distinguish an EA from an indicator and a script (without "dissecting" it in the editor). I've got everything mixed up in my folders. The EA folder is full of non-working indicators and the indicator folder is full of non-working scripts. So I (just in case) copy the new EA indicator into both folders.
I think this is a big mistake made by the language creators. The file extension should be different.
What do the aksakals have to say?