
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
Happy Victory Day!!! It's been 4 days - no reply. Let's try... Dissatisfied people write in person!!!
And then the question arose: if there are only two orders. One with a big lot with negative profit, and one with a smaller lot with positive profit
What if there's only one order. What if all orders have the same lot and all with a negative profit - should we close one by one?
Hello!
Can I get some help? The Expert Advisor is retrieving tradesevery tick. How do I write code to take away about 5 trades or only as many as I want?
extern int tp=50;
extern int sl=200;
extern double lot=0.01;
void OnTick()
{
OrderSend("USDJPY",OP_SELL,lot,Bid,0,Ask+sl*Point,Ask-tp*Point, "Batsasho",1,0,Red);
}
What should I change, add to the code?
Can you answer ***.
Thank you!
Hello!
Can I get some help? The Expert Advisor is retrieving tradesevery tick. How do I write code to take away about 5 trades or only as many as I want?
extern int tp=50;
extern int sl=200;
extern double lot=0.01;
void OnTick()
{
OrderSend("USDJPY",OP_SELL,lot,Bid,0,Ask+sl*Point,Ask-tp*Point, "Batsasho",1,0,Red);
}
What should I change, add to the code?
Can you answer ***.
Thank you!
First of all, shorten the testing time interval. Best: 1) the last three months. 2) three months with a brexit in the middle. Make sure not to test on all ticks. In fact, in MT4, there are no ticks in the history, and they are modeled by light jerks of price up and down. If you test on two timeframes - M15 and M1, then see, where it is better. Or, better yet, use the demo - start it on Monday morning and check the result on Friday evening using the well-known script. If we need to test 100 Expert Advisors, we open 10 terminals and in each terminal there are 10 charts with Expert Advisors.
It is necessary to have a lot of computers. On a real account $4 with 500 leverage is enough. Look at any chart - with correct entry you can easily double your deposit in a day. And that's a million times in a month. Are there such free EAs on the Internet? Will anyone sell such? Therefore, the money should be invested in computers. We are looking for the entry points. We write programs, calculate in Excel using the formulas and macros, and write scripts and Expert Advisors for calculations. Then, when we figure out how to find entry points, and then Robots, Stops, Trawl, Deposit, Deposits, Withdrawals...
Happy Victory Day! It's been 4 days - no response. Let's try... The dissatisfied ones write in their personal accounts!!!
And then the question arose: if there are only two orders. With a big lot with a negative profit, with a smaller lot with a positive profit
What if there's only one order. What if all orders have the same lot and all with a negative profit - should we close one by one?
But "Ticket" doesn't work in Cyrillic, it has to be "Ticket" in Latin.
for(int Ticket=OrdersTotal()-1; Ticket>=0; Ticket--) - this is the code of the market order search by the ticket in the reverse order (from the last opened to the first one) - do I get it right?
But "Ticket" in Cyrillic won't work, you need "Ticket" in Latin.
Happy Victory Day!!! It's been four days - no answer. Let's try... Dissatisfied people are writing in private!!!
And then a question arose: if there are only two orders. With a big lot with a negative profit, with a smaller lot with a positive profit
And if there is only one order. And if all orders have the same lot and all with a negative profit, should we close one by one?
Thank you very much! This is a good function! This function should be called if there is not enough margin to open another order. But I did not express my idea correctly; it turns out I needed something else! The largest lot with the largest profit from open positions and the smallest lot with negative profit from open positions.