Auftrag beendet
Spezifikation
I want to program an EA which is using on a definite time a Price and if the next few hours are price changing for xpips ea is opening a position in the opposide direction with TP and SL. (I want to choose if opening is in opposide or in trend direction)
The EA have also partial TP closing and also partial Loss closing.
In the chart should be the entry price with a line marked and also SL (red) and TP (green)
Parameters:
Following parameters I need 2 times for 2 theoretical entry prices
Price at time: Ea should use price fore example from 2 a clock server time
Open Trend or Opposide order:
Stop time: Till this time EA dose compare (theoretical entry price and actual price, if in this period pips are higher or lower than xpips ea does open an opposite or trend trading position)
Hours to wait: After X hours EA start to compare till stop time the price from this theoretical entry price. If there is a changing more than pips change EA does open a opposide ore trend order. (this I want to choose)
Pips changing: 20pips if price changes from theoretical entry price more than 20 Pips in the time period after hours to wait and stop time – EA is opening a opposite or trend position with xlots. This can be chosen. For example 1 percent of equity in margin.
Session end: for example at 6 a clock the session is ending. If Order is after 6 a clock in Profit. The hole order should be close. If after 6 a clock the order is in minus and comes in profit – the order should be closed directly.
Max Orders – open only max orders in this currency
Risk of equity to open lots – definite on percent of equity for margin. The calculated lots should be shown in chart.
TP and Sl should be definite
Example:
At 2 a clock price is in EURUSD 1.3600
EA has to waiting x hours for copair.
Than EA is comparing the actual price with the theoretical Price at 1.3600.
If price is 1.3619 and I have acting on more than 20 pips to open a position – EA does not open a position.
If price is after Hours to wait 1.3621 – EA does open a sell or by order with TP and SL I can definite.
Partial closing in TP and Break even - and partial closing in loss.
This settings work for all orders. For boath theoretical entry prices
1. Partial closing in TP and Break even
BE=Break Even
SecureProfit1=1
SecureProfitTrigger1=5
SecureProfit2=6
SecureProfitTrigger2=10
SecureProfit3=15
SecureProfitTrigger3=18
SecureLoss=3
PartialClose=========== Partial Close Settings ==========
Partial_Close=1
Close_X_Percent_1=25.00000000
Close_at_Profit_1=8.00000000
Close_X_Percent_2=40.00000000
Close_at_Profit_2=12.00000000
Close_X_Percent_3=85.00000000
Close_at_Profit_3=24.00000000
Partial closing in loss.
Set active or inactive – 3 partial closing functions.
1-Xpips minus is 10pips
1-Close xpercent of the order is 50%
1-On pips minus from entry is -5 Pips from entry price.
If price goes minus 10pips and goes than back to minus 5 pips. 50% of the order will be closed at -5pips and if price goes higher than remaining order will be closed under normal conditions.
2-Xpips minus is 15pips
2-Close xpercent of the order is 50%
2-On pips minus from entry is -10 Pips from entry price.
If price goes minus 15pips and goes than back to minus 10 Pips . 50% of the order will be closed at -10pips and of the remaining order will be closed 50% on -5 Pips.
If price goes higher than rest of order will be closed under normal conditions.
3-Xpips minus is 20pips
3-Close xpercent of the order is 50%
3-On pips minus from entry is -15 Pips from entry price.
If price goes minus 20pips and goes than back to minus 15 pips . 50% of the order will be closed at -15pips and of the remaining order will be closed 50% on -10 Pips.
If price goes now higher from the rest will be closed 50% on -5 pips
If price goes higher than rest of order will be closed under normal conditions.
In chart I want to see the Price at time: from which price at Time the calculation starts.
Theoretical entry price for a long and short order. For buy (blue) for Sell (red).
After opening the position TP and SL of the new order.
And the opening lots 1percent of equity – in amount of lots