Lavoro terminato
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Specifiche
The hedge scalper trades only when there are more than one open positions , in a trending set up.These other trades are put on by other profitable eas with own magic numbers.
The hedge scalper will open positions counter trend , but scalp for 10 pips profit , only if there are more than 0ne open positions .If a second position is opened , it will start hedge scalping trades.
hedge scalper trade = scalphedge
The original trade has to be scalped hedged 3 times , after closing of a scalphedge at a profit , the scalphedge trade is reinstated .
If after a hedge signal is received , and no hedge is active , and price touches 30 pips against the orignal trade , there will be no further scalphedges hedges on the signal .
stop scalphedging after 110 pips loss on hedge
Delete all pending orders , if price touches 30 pips against the original trade
if trade opened at 1.3030 , first scalphedge is at 1.3032 , second time after a profit on scalphedge = reinstate at 1.3040 , third time reinstate scalphedge at 1.3050 .only 1 scalphedge open at any one time for every signal above 1 trade.
If there are 4 signals for 4 trades on same symbol , they have to defined and coded as hedges for different signals on same pair.your main problem is defining multiple hedges , if more than 2 trades open on same symbol , example 4 trades by other eas = 3 hedges at same time * 3 entries = 9 pending trades at same time , if 4 trades are open and 3 are to be hedged.
option :code for use manually as a hedger for manual trade = manual modes
scalper hedge: only hedge symbol on which symbol chart it is placed , if placed on eur/usd it will only scalphedge eur /usd
CLEARLY DEFINED FUNCTION CALLS WITH CLEAR INPUTS to be coded modular design
.int nohedge :30 //(for both longs and shorts).It will not hedge anymore until a further new signal is received.
int Delete all pending orders ,// if above no hedge ;30 , is triggered.
Number of trades open before open trade is hedged :2 //if 0 it will hedge all trades //START HEDGING AFTER SECOND TRADE IS OPEN
Int Pip Gap:Number of pips in profit , before firstHedge trade is put on:+2 profit // will hedge trade after 2 pips profit
input int StartscalpHedgingfirsttime 1 = -20; //Start Hedgefirsttime from profit (points) 2 PIPS buy or sell at market
input int StartscalpHedgingsecondtime 2 = -120; //Start Hedgesecondtime from profit (points) 12 PIPS //after profit take 1 on scalphedging //pending order
input int StartscalpHedgingthirdtime 3 = -220; //Start Hedgethirdtime from profit (points) 22 PIPS
//after profit take 1 and 2 on scalphedging//pending order
input int StopscalpHedging = 1100; //Close Hedge from loss (points)CLOSE HEDGE AFTER 110 PIP LOSS
int scalpHedgingMagic = 15215;
input double LotCoeff = 1; //Lot Coefficient for hedge orders
input int MagicNumber = 1; //Magic Number (if 0 = for all orders on symbol)//MAGIC ON ORIGNAL TRADE
extern int Slippage = 3;
see image of trades
Job will remain open for a week. I am bit busy today.