[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 546
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
The EA has the following block (Event Counter):
if (isCloseLastPosByStop()==True) //If the last order was closed by Stop
QUESTION: how to write the data into a file (Excel) instead of displaying it on the screen?
Good afternoon, could you tell me how it can be, I select an order in one loop, I go through which order is last and remember it so ticket = OrderTicket();
In this case let's say it's number two. A bit later if (ticket>-1){
OrderSelect(ticket,SELECT_BY_TICKET,MODE_HISTORY);
and i often get error 4105 - order not selected!!!
And that's because the order hasn't been closed yet. It is not in MODE_HISTORY, it is still in MODE_TRADES.
No way! Why not? There were no open orders at the time of the overshoot! Maybe I don't understand.
The search cycle is also on history! That's where I assign it to the int ticket variable!
And it swears, excuse me, 2012.02.04 11:28:47 2011.12.06 16:35 GMT EURUSD,M30: Alert: SELL Select error HISTORYticket 4105
When it gets from MODE_HISTORY to MODE_TRADES?
And most importantly, I select the same order on the history with the help of order select, and it is selected first, otherwise I wouldn't be able to work with it! There's no logic !!!!!! I'm shocked...
No way! Why not? There were no open orders at the time of the overshoot! Maybe I don't understand.
The search cycle is also on history! That's where I assign it to the int ticket variable!
And it swears, excuse me, 2012.02.04 11:28:47 2011.12.06 16:35 GMT EURUSD,M30: Alert: SELL Select error HISTORYticket 4105
When it goes from MODE_HISTORY to MODE_TRADES ?
help insert a stop loss into an EA
please
Please share the function for calculating the maximum allowable lot, taking into account the open positions, i.e. equity. The standard function calculates the risk, but if there are trades, there is not enough money to open them
In the simplest case it is like this:
Guys, can you advise on this question?
Here's a script to find the maximum size of the zig-zag backlash from crenfx - see here:
I throw it on the chart of the instrument on M5 - it works fine with the default timeframe
it is the maximum depth of history for the symbol in the Alpari office when loading it with F2 - I checked it, i.e. it looks like the content of the "Experts" tab of the client terminal - it seems to be true:
When using the same script design in my EA on the same time interval on the same M5 chart period it doesn't count correctly, i.e.
it calculates quite different (smaller than in the script) numbers or 0. What may be the error or it may be some kind of history inconsistency? Thank you.
I.e., I start in the tester with owl after the estimated time for finding a failsafe, in theory all is normal and the numbers at the end of the script and owl should be the same... What could be the error?
This is how I charge this script to my owl:
It seems to be all the same - what could be the mistake?