Create buttons to open positions and move stops and fill a graphical table

2020.02.14 Experts Design

Specification

Hi, 

the job is in the title. 

please see the attached file before reading.

1 - In the first column, we have the margin percentages for all symbols, whether monthly, weekly, or daily with one digit : 17.2 % = 100 * ( Account balance / (Account balance - won/loss this month, week or day ) ) -1

2 - In the second column number of points (indices) or pips (pairs) won/loss monthly, weekly and daily for the current symbol on the chart.

3 - in the third column, like in the first column but only for the current symbol on the chart.

4 - in the last line, named "Direct", we have  the Risk / Reward of the current opened trade , the number of points/pips running, and the margin percentage . All for the current trade.

    Risk/Reward= OrderProfit / (     Abs ( OrderOpenPrice-Order virtual stoploss) + spread + commission )

For all these values, a red color if negative, green if positive, and white if = 0 

i wrote "virtual stop loss" because i often use stoploss below the STOP LEVEL, so please forget OrderStoploss() and use a virtual stop loss where position will close if Bid > or < "virtual stop loss".


i need a red line on the bottom of the chart, like on the capture. this red line will be abble to move by dragg and drop, to vsualize a stoploss.

So : 2 ways to buy / sell 

      * by choosing a stop loss level with the red line and clicking on the "Ligne" button. if the stop is below, it will buy, above it will sell, and virtual stop loss = red line level.

       on orders, red line will disapear, replaced by a stop loss drawn like stairs when we 'll move stop loss with buttons.

    * by clicking on "Achat" button or "Vente" button. in those cases, virtual stop loss will be placed up or under the hihgest/lowest of the last passed 3 candles + security. Same drawings for the stop loss, following candles.  Security is a double input in order to avoid double top/bottom.


in all cases, when on position, red line disapears, and appears again when OrdersTotal=0

"+1" "-1" "+5" & "-5" buttons are for increasing or decreasing the stop loss in points ( indices ) or pips ( pairs ).

"B.E." : Break even including spread

"X" : closing current position


last thing : 3 inputs

* double : security

* int : margin of the account balance used in % 

*double : Risk in % = % of Account balance depending on margin used, stop distance for each trade


for the number of lots : Math min ( input Risk(%) , available free margin )





Files:

JPG
Capture.JPG
115.7 Kb

Responded

1
Developer 1
2020.02.14
Rating
4.87
(95)
Projects
115
42%
Arbitration
33
27% / 42%
Overdue
3
3%
Busy
2
Developer 2
2020.02.14
Rating
4.8
(302)
Projects
444
43%
Arbitration
100
18% / 70%
Overdue
99
22%
Busy
3
Developer 3
2020.02.14
Rating
4.93
(183)
Projects
362
49%
Arbitration
28
36% / 32%
Overdue
95
26%
Working

Project information

Budget
50+ USD
VAT (20%): 10 USD
Total: 60 USD
For the developer
45 USD
Deadlines
from 1 to 2 day(s)