Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 105
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
Hello!
Sorry for bringing up a relatively old topic. I have understood everything with the code.
Now I have a puzzle, how to open a trade. For example, right after a given range, we are looking for
The price is lower than the maximum by a certain amount of points. We open a deal.
I have tried to add such a code and run it in the tester, but it does not open deals.
What to do?
This should work, I haven't tested it myself, as the terminal is busy optimizing another EA so far
This should work, I haven't tested it myself as the terminal is busy optimising another EA
This should work, I haven't tested it myself as the terminal is busy optimising another EA
Can I remove this line or it won't work without it? I do not understand why I have to close the order?
Can this line be removed or will it not work without it? I do not understand why I have to close an order?
Of course you can remove it, it is only to test it and not to multiply the number of open orders. This is just a training example of an EA. It opens no more than one SELL order per day. And in your EA, you should decide yourself how to close orders: by stop loss, take profit or other conditions. The time 22:55 is chosen because many brokerage companies significantly increase spread, especially on Fridays after 11:00 PM. You may think that we should open more than one order per day. And this is an example for an order placed to one side. We should look for the minimum by analogy. This code as an example, I hope it will facilitate the creation of my own EA)
Hello!
I'm a dummy, but I want to change something in the code myself...
Any advice, if you don't mind your time...
I have a few questions:
1. How do I add a variable "stop loss" to my EA ? I want to be able to change it, of course.
2. How to enable my EA to add a comment for each of my trades ?
3. How to add an EA with a magic number?
Hello!
I'm a dummy, but I want to change something in the code myself...
Any advice, if you don't mind your time...
I have a few questions:
1. How do I add a variable "stop loss" to my EA ? I want to be able to change it, of course.
2. How to enable my EA to add a comment for each of my trades ?
3. How to add an EA with a magic number?
1. external double StopLoss=100.0;//add stop loss variable
2-3. int ticket=OrderSend(Symbol, TypeOfOrder,LotsOfOrder, OpenPriceOfOrder,Slippage, OpenPriceOfOrder+/-StopLoss,OpenPriceOfOrder-/+TakeProfit,YourMagicNumber,0, CLR_NONE) ;
4. READ!
Here's the joint:
Good afternoon!
Can you tell me how to set up the optimisation of the Expert Advisor so that it shows negative pass results as well?
Good afternoon!
Can you tell me how to set up the optimisation of the Expert Advisor so that it shows negative pass results as well?