Script to create a grid of Limit Orders up or down from current order on chart, if buy, then set Buy Limits in a Grid below the order, if sell, then set Sell Limits in a Grid above the order

MQL5 스크립트 다른

작업 종료됨

실행 시간 22 시간
고객의 피드백
Great job, got it done quick, and also exactly what I wanted!
피고용인의 피드백
Friendly, courteous, and communicated requirements very clearly. Pleasure working with him.

명시

1. I want a script, that will first determine if I have a trade on the chart, is it a buy or sell, and the size of the trade in lots to be used in the calculations of the grid of limit orders being created:

a. If no trade is on chart, tell me "You need to first place a trade" then the script takes no further action

b. If multiple trades are already on chart, tell me "Can can have only one trade on chart to run this script" then the script takes no further action

c. If one trade is on chart, the script will take actions below

2.  User input: Ask me lot size of each grid level  "Spacing of grid levels:  ____"  and then I enter a number, example 5,

3.  User input: Ask me how many grids to place on the chart "How many grid levels below price:  ____" and then I enter a number, example 3

4.  Using data about the existing trade on the chart, and the two user inputs, take the following action:

a. If buy is on chart, place a number of limit orders equal to what user entered on number of grid levels, below current order, at spacing specified in pips by user

b. If sell is on chart, place a number of limit orders equal to what the user entered on the number of grid levels, above current order, at spacing specified in pips by user

5.  Size of each grid level will be in increasing increments depending upon the size of the original trade on the chart

a.  If trade on chart is 0.50 lots, 

(1) 1st Limit order placed will be 1.00 lots

(2) 2nd Limit order placed will be 1.50 lots 

(3) 3rd Limit order placed will be 2.00 lots

etc... to the number of levels indicated by the user

b. If trade on chart is 1.00 for example

(1) 1st Limit order placed will be 2.00 lots

(2) 2nd Limit order placed will be 3.00 lots

(3) 3rd Limit order will be 4.00 lots

c. So each grid level will have limit orders that are incrementally larger than the previous level, based upon the existing trade size on the chart

Example from a chart



응답함

1
개발자 1
등급
(52)
프로젝트
66
41%
중재
1
0% / 100%
기한 초과
7
11%
무료
2
개발자 2
등급
(70)
프로젝트
83
11%
중재
13
62% / 23%
기한 초과
6
7%
무료
게재됨: 16 기고글, 6 코드
3
개발자 3
등급
(132)
프로젝트
178
39%
중재
4
25% / 50%
기한 초과
14
8%
무료
4
개발자 4
등급
(252)
프로젝트
462
26%
중재
139
20% / 60%
기한 초과
100
22%
무료
5
개발자 5
등급
(65)
프로젝트
96
52%
중재
3
33% / 67%
기한 초과
24
25%
무료
6
개발자 6
등급
(493)
프로젝트
1022
58%
중재
30
27% / 23%
기한 초과
133
13%
작업중
7
개발자 7
등급
(169)
프로젝트
204
30%
중재
25
40% / 44%
기한 초과
12
6%
무료
8
개발자 8
등급
(119)
프로젝트
169
38%
중재
9
78% / 22%
기한 초과
15
9%
무료

프로젝트 정보

예산
100+ USD
기한
에서 1  7 일