SpiderNotKnowWeb
- Experts
- Iurii Kuksov
- Versione: 1.0
- Attivazioni: 5
This Expert Advisor uses Moving Average with certain parameters to open orders. He will always open the first deal to buy, but, with certain settings, he can only open deals to sell. To close orders, he uses a profit after which he will close all orders and start his work again. So far, it works as a Martingale and as a networker.
extern double Lots = 0.20; - - From this parameter, which is the value of the currency at which you will to trade, the Expert Advisor begins its work. That is, the first one that opened an order in the terminal will be opened for $ 0.20 if you have an account in in dollars and a purchase order will be opened. Next, the adviser will work on the martingale principle and the parameter will be responsible for increasing transactions MultiplierBuy. If the price threatens to lose, then with the StepBuy parameter you can set exactly where and at what distance from the opened unprofitable order to open another purchase order, which would thereby compensate for the loss incurred by the order that was opened before the newly opened order. P.S.: Here it should be noted that this parameter cannot equal "Zero - 0", since multiplication is going on in the code and in this case there will be an error and the second and subsequent orders, if the current price goes to a loss, will not be opened. But if you want your advisor to if I traded one lot and opened a network of orders, then this parameter should be made "One - 1". extern double Lots2 = 0.70; - Here it is necessary to say a little about the trading strategy of the adviser itself. He opens either a network or martingale orders only for purchase. The parameter WhenToClose determines after which order a counter sell order with an increased lot will be opened, since the current price is moving at a loss, in order to close all the ADVISER's orders when a certain amount is reached and start trading anew from scratch. Here, in the settings, it is worth, that after the second order, a sell order will be opened. And if the current price is still moving in the direction of loss, then when the DistanceToClosing parameter is reached, in points, a sell order will be opened, at a price multiplied by the IncreasingClosingAmount parameter, that is, by ten to 10, at a price of $ 2.00. And when the profit is reached, the amount set by the - CloseTOTAL parameter, here 10 cents or more, the Adviser's orders will be closed. And the parameter Lots2 is responsible if this condition is not met and the current market price changes its trend and goes against closing orders and a margin call will begin to threaten, since the sell order was opened with a large lot, then, after the very first buy order, the current market price, reaching the distance specified by the BuyClosure parameter, we will open again, a buy order at the Lots2 price, in the hope that our orders in the bag will cover the losses of an open sell order and when a certain amount is reached, our orders will be closed with a profit specified by the CloseTOTAL parameter. extern double Lots3 = 4.00; - This parameter of the ADVISER is responsible for the lot of the opened order, if the current market price will change its trend again and go to a loss already to all open orders in the market, then we will try to change the situation in We will open a sell order at this price and the ADVISER will close all orders when the parameter specified by us in CloseTOTAL is reached. extern int Slippage = 50; - this is a parameter of slippage from the current price. extern int Magic = 401; - This is a magic number extern int Magic2 = 402; - This is a magic number extern int Magic3 = 403; - This is a magic number extern int Magic4 = 404; - This is a magic number P.S: You can open two or more Expert Advisors in the terminal. But, no matter what they do not interfere with each other in their work, it will be necessary to change each adviser all the magic numbers so that they do not look like each other, since The ADVISOR uses separate magic numbers for each operation. //--- extern int BeginningSELL = 6; - this parameter determines after which open purchase orders will be placed A sell order is being opened. (In this case, it won't be open, so how the order closing events will occur). extern double StartMultiplierSell = 2.0; - this parameter is a multiplier and answers at what price it will be opened a sell order. Here he doubles it, that is, Lots = 0.40; //--- extern int StepBuy = 600; - this parameter is responsible for the items for which the next one will be opened a buy order if the price goes to a loss. extern int StepSell = 100; - this parameter is responsible for the points for which the next order will be opened for sale if the price goes to a loss. extern double MultiplierBuy = 2; - this parameter is a multiplier, responsible for increasing the lot, at what price it will be buy an increasing buy order. extern double MultiplierSell = 2; - this parameter is a multiplier, responsible for increasing the lot, at what price it will be buy an increasing sell order. //--- extern double CloseTOTAL = 0.10; - this parameter is responsible for the amount, profit, reaching which and more The Adviser will try to close all the orders in the market with this an advisor. extern int BuyClosure = 1000; - this parameter is responsible for the logic of operation, and if there are no orders closed for profit and the price will go up to the moose and change its trend,then, after overcoming the current market price of the first purchase order by the specified distance in points, a purchase order will be opened in order to overcome the sum of the purchase orders that have already been opened loss by an open sell order and close orders with a profit specified by the CloseTOTAL parameter. extern int SellClosure = 200; - this parameter is responsible for the distance to open a sell order, if the current price changes its trend again and goes to the bears and, what would try to close orders again with the profit specified by the parameter CloseTOTAL. extern int WhenToClose = 2; - this parameter determines after which purchase order the order will be opened to sell in order to close all orders in the market after reaching the specified price and more by the CloseTOTAL parameter. extern int DistanceToClosing = 50; - this parameter determines at what distance from the order it will be opened a sell order to close all orders in the market. extern double IncreasingClosingAmount = 10; - this parameter is a multiplier and increases the Lots in order to the opened sell order could close all open orders for the purchase.