I will write an advisor free of charge - page 102
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
If you have a good strategy and are willing to share it, I can write an EA.
How can I add a balance-dependent open order size to my EA?
e.g.
$100 lot 0.05
$200 lot 0.1
$500 lot 0.25
$1000 lot 0.5
$1200 lot 0.6
$1500 lot 0.75
$2000 lot 1.0
$3000 lot 1.5
$5000 lot 2.5
$10000 lot 5
How can I add the size of the order to be opened to the EA, depending on the balance?
eg
$100 lot 0.05
$200 lot 0.1
$500 lot 0.25
$1000 lot 0.5
$1200 lot 0.6
$1500 lot 0.75
$2000 lot 1.0
$3000 lot 1.5
$5000 lot 2.5
$10000 lot 5
You can specify percentage of balance Percent=5, for example:
double One_Lot=MarketInfo(Symbol(),MODE_MARGINREQUIRED);//Value. 1 lot
double Min_Lot=MarketInfo(Symbol(),MODE_MINLOT);//Min. lot size
double Step =MarketInfo(Symbol(),MODE_LOTSTEP);// Step change size
double Free =AccountFreeMargin();
lots=MathFloor(Free*Percent/100/One_Lot/Step)*Step;
if (lots<Min_Lot) lots=Min_Lot;
can be solved via global variables
and each running EA must be modified accordingly in the code
For example: if there is an order in the market, a global variable is activated,
every EA which sees this does not tradeHi all !
Anybody out there who can write a simple non-syndicator EA ! ?
Hi all !
Anybody out there who can write a simple non-syndicator EA ! ?
No problem ! An EA opens either BUY or SELL position with a given volume:
I'm ready to pay a symbolic sum of acouple of hundred rubles.
The Expert Advisor opens2 differently directed orders simultaneously(1 for each currency pair) only when the specified spread forBOTH pairs is lower or equal than that specified in the settings for both currency pairs. If the condition worked for one currency pair and did not work for the other,DOES NOT OPEN ANYWHERE.
It does not open new orders after the orders have been opened, but only waits for the total profit of two orders specified in the robot settings.ONLY 2 DIFFERENTLY DIRECTED ORDERS ARE ALWAYS OPENED
After the orders are closed, the robot again monitors the spreads of both currency pairs and opens again when the spread isALREADY lower or equal to that specified in the settings.
If you are able to set the running time (beginning on Tuesday 00-00 and ending on Thursday 23-59) it will be great.
Here is how it works:the EA(when the required spread appears on both pairs)opens one buy order, the second one sells (or vice versa is not important), waits for the profit, then closes both orders and then restarts. If two orders are open, no new ones will be opened. The Expert Advisor is waiting for the profit set in the settings.
No matter what currency pair the advisor is set on, it will only work with the two currency pairs specified in its settings:
Parameters:
1. Name of the first currency pair (EURUSD)
2. Lot for the first pair (0.1)
3. Order type for the first (Buy)
4. Minimum Spread for the first In PIPS 5. at which the Expert Advisor will trigger (2)
5. Name of second currency pair (GBPUSD)
6. Lot two (0.1)
7. Type of order second (Sell)
8. Minimum spread for the second In PIPSAH 5 sign at which the advisor will trigger (2)
9. Total profit of both pairs inthe deposit currency(or percentage. if that is easier) to close both orders at once
10. Trading start time Tuesday 00-00
11. Closing time Thursday 23-59
Easy! The Expert Advisor opens either BUY or SELL position with a given volume:
Thank you very much for the speed!
But I need it to open an order at the opening of a bar, took a profit and waited for the opening of a new bar.
Hello dear programmers, I ask you to write an EA based on the indicator to open an order, but there is one catch-22, we need that the EA would open an order not only on the signal indicator, but also at certain times (for example, if the indicator gave a signal at the beginning of the formation of the candle, say from 15:00 to 15:01 then this signal is considered valid and the EA opens the order) (if the signal indicator received 15:02 then the signal is NOT valid and the Council does not open the order)