작업 종료됨
명시
HI
I HAVE ATTACHED A FILE WITH CODES OF MY EA AND SOME MODIFICATIONS AND SOME NEW PARAMETERS NEED TO BE ADDED
THE REQUIRMENTS ARE AS FOLLOWS
MODIFICATION NEEDED
1. EA IS CONSTANLY DELETING THE PENDING ORDERS NO NEED TO DELETE THE PLACED PENDING ORDERS IF IT NOT ACTIVATED INSTEAD MODIFY THE PLACED PENDING ORDER TO THE VALID NEW SINGAL IF APPICABLE
EXAMPLE
IF A BUY STOP IS PLACED AND IT IS NOT ACTIVATED CURRENTLY IT IS DELETING THE PLACED PENDING ORDERS IF IT IS NOT ACTIVATED AND IT IS DELETNG WHEN OPPOSITE PENDING ORDER IS PLACE INSTEAD OF CURRENT SETUP WHEN THERE IS VALD NEXT BUY STOP SIGNAL EA SHOULD MODIFY THE NON AVTIVATED BUY STOP TO THE NEW VALID SIGNAL
EA SHOULD MODIFY THE NON ACTIVATED SELL STOP TO THE VALID NEXT SELL STOP SIGNAL
2. MANANGE ENTRY POINT
EXAMPLE GOLD
PARAMETER VALUE IS 100
LET'S SAY PRICE MOVING UP
ACTIVE SELL AT 1945
IF THE EA SIGNAL NEXT SELL STOP PENDING ORDER AT 1945.50 MAKE THIS SIGNAL NOT VALID
BECAUSE THE DISTANCE FROM THE ACTIVE TRADE IS LESS THAN PARAMETER VALUE
IF THE EA SIGNAL SELL STOP PENDING ORDER AT 1946 SO THIS SIGNAL IS VALID
BECAUSE THE DISTANCE FROM THE ACTIVE TRADE IS MATCHES THE PARAMETER VALUE
SO PROBABLY THE ACTIVE TRADE WILL AROUND 1946
OK NOW
ACTIVE SELL TRADE AT 1946
ACTIVE SELL TRADE AT 1945
SO IF ANY SELL STOP SINGAL BETWEEN 1946 AND 1945 IS NOT VALID
ONLY BUY STOP IS VALID BETWEEN 1946 AND 1945
SAME FOR THE BUY STOP
LET'S SAY PRICE MOVING DOWN
ACTIVE SELL AT 1946
ACTIVE SELL AT 1945
EA SINGAL SELL STOP AT 1946.50 THIS SINGAL IS NOT VALID SO NO NEED TO PLACING PENDING ORDERS
SINGAL BETWEEN 1946 AND 1945 NOT VALID DUE TO THE ACTIVE TARDE EXISTS
EA SIGNAL SELL STOP AT AT 1944 IS VALID BECAUSE THE DISTANCE BETWEEN THE ACTIVE TRADE THE PARAMETER MATCHES
NEW PARAMETERS NEEDED
1. DAILY PROFIT PARAMETER (IN PERCENTAGE ON THE BALANCE)
ONCE THE ACCOUNT EQUITY PARAMETER VALUE REACHED STOP THE TRADING OPERATION AND DELETE ALL PENDING ORDERS AND CLOSE ACTIVE TRADES AND WAIT FOR THE NEXT DAY
2.CLOSE ALL IN PROFIT (IN PERCENTAGE OF THE BALANCE )
WHILE CLOSING THE TRADES EA SHOULD TAKE IN TO ACCOUNT THE THE SWAP CHARGES AND COMMISION CHARGES
THIS PARAMETER SHOULD CALCULATE THE HIGHER PRICE AND LOWER PRICE OF THE ACTIVE TRADES AND LOOKS FOR THE FOLLOWING CONDTIONS TO CLOSE
CONDITION 1 - WORKS WHEN THERE IS ACTIVE BUY AND SELL
CONDITION-2 WORKS WHEN THE ACTIVE TRADES ARE IN PROFIT IF THE OPPOSITE TRADE ACTIVATED
CONDITION-3 WORKS WHEN THE ACTIVE TRADES ARE IN PROFIT AND THERE IS NO OPPOSITE TRADE
EXAMPLE FOR
CONDITION 1
MAKE IT LIKE 1 BUY LOSS OR SELL LOSS WITH OPPOSIT 2 PROFITABLE TRADES ONLY
BUY AT 1920-PROFIT
BUY AT 1918-PROFIT
BUY AT 1915 -PROFIT
SELL AT 1914 - LOSS
SELL 1912 -LOSS
IN THE ABOVE CASE(PRICE MOVING UP) EA SHOULD SELL LOSS ONLY WITH NEXT 2 PROFITABLE BUY PROFIT
SO EA SHOULD CLOSE THE LOWER PRICE SELL LOSS (SELL AT 1912) ONLY WITH THE NEXT 2 BUY PROFIT(LOWER PRICE) WHICH IS AT 1915 AND 1918
BUY AT 1920-LOSS
BUY AT 1918-LOSS
BUY AT 1915 -LOSS
SELL AT 1914 - PROFIT
SELL 1912 -PROFIT
IN THE ABOVE CASE (PRICE MOVING DOWN) EA SHOULD CLOSE THE BUY LOSS ONLY WITH THE NEXT 2 PROFITABLE SELL PROFIT
SO EA SHOULD CLOSE THE HIGHER PRICE BUY LOSS (BUY AT 1920) ONLY WITH THE NEXT 2 SELL PROFIT (HIGER PRICE ) WHICH IS AT 1914 AND 1912
CONDITION 2
EXAMPLE
SELL AT 1965-PROFIT
SELL AT 1964-PROFIT
SELL AT 1963- PROFIT
BUY AT 1959 -PROFIT
IN THE ABOVE CASE EA SHOULD CLOSE SELL AT 1965 AND BUY AT A959
CONDITION 3
EXAMPLE
WHEN PRICE MOVES UP THE FOLLOWING TRADES ARE ACTIVATED
BUY AT 1912-PROFIT
BUY AT 1913 -PROFIT
BUY AT 1914-PROFIT
BUY AT 1915-PROFIT
LET'S SAY THE REVERSES FROM 1916
AND BUY AT 1915 ARE IN LOSS
EA SHOULD CLOSE BUY AT 1912 WHICH IS IN PROFIT WITH BUY AT 1915 WHICH IS IN LOSS WHEN THE CLOSE IN PARAMETER VALUE REACHED
EA SHOULD CLOSE BUY AT 1913 WHICH IS IN PROFIT WITH BUY AT 1914 WHICH IS IN LOSS WHEN THE CLOSE IN PARAMETER VALUE REACHED
BASIC IDEA IS FOR THE BUY IS LOWER PRICE (PROFIT) SHOULD CLOSE WITH HIGHER PRICE (LOSS)
FOR THE SELL HIGHER PRICE (PROFIT) SHOULD CLOSE WITH LOWER PRICE (LOSS)
THIS CONDITION SHOULD WORK WHEN THERE IS NO OPPOSITE TRADE OPEN