Job finished
Specification
At the
beginning of a timeframe (let me set the timeframe), open buy and
open sell with hidden_take _profit defined in pips, points or value
(let me choose).
Starting_Lot is calculated as percent from
Balance or as given value (let me choose).
Let me choose
Trading_Hours and Trading_Days.
Opening, calculations and
closing decisions are made only after opening and closing of defined
timeframe.
In case of restarting, the robot must remember the
current and last set of working parameters.
At the end
of the timeframe, there are 4 possible outcomes, as seen in the
drawing:
1.a. Buy hits Take_profit, Sell is in profit.
Then close Sell with profit.
Start over at the next timeframe
with the new calculated Starting_Lot.
1.b. Buy hits
Take_profit, Sell is loosing. If profit from buy is bigger than sell
loss, close sell. Alltogether this timeframe is in profit.
Start
over at the next timeframe with the new calculated Starting_Lot.
1.c. Buy hits Take_profit, Sell is loosing. If profit
from buy is smaller than sell loss, close sell and increase
Starting_Lot , calculated as (constant_defined_by_me_between_0.1_and
5) * ( ( Closing_Price_Pips - Open_Price_Pips ) / 10 ) / ( a / 12 ) .
Start over at the next timeframe with this increased calculated
Starting_Lot.
2. Buy hits Take_profit, Sell hits
Take_Profit. Before end of timeframe, both cashed profit.
Start
over at the next timeframe with the new calculated Starting_Lot.
3. Neither buy or sell hits Take_Profit.
Leave both
orders open for another timeframe.
4.a. Sell hits
Take_Profit, Buy is in profit. Then close Buy with profit.
Alltogether this timeframe is in profit.
Start over at the next
timeframe with the new calculated Starting_Lot.
4.b.
Sell hits Take_Profit, Buy is loosing. If profit from sell is bigger
than buy loss, close buy. Alltogether this timeframe is in profit.
Start over at the next timeframe with the new calculated
Starting_Lot.
4.c. Sell hits Take_profit, Buy is
loosing. If profit from Sell is smaller than Buy loss, close Buy and
increase Starting_Lot , calculated with above_in_mirror formula.