Quick and Easy Script - with user inputs

MQL4 脚本

指定

Hi i know this will be quick and easy for some people.

I need a script that does tthe following:

User Inputs:
Pair = user can input pairs , separated by "/" or a separator of your choosing
TimeFrame = WEEKLY
Breakout %
Stop Loss %
Account Risk per Trade (based on SL)

very simply,

For each PAIR in the PAIR range (user input)
Take Previous Week Candle (Candle[1]) High and Low Range
Place Buy Stop at Current Price + Breakout%(user input) x Candle[1] High Low Range, with SL of Stoploss%(user input) x Candle[1] High Low Range
Place Sell Stop at Current Price -  Breakout%(user input) x Candle[1] High Low Range, with SL of Stoploss%(user input) x Candle[1] High Low Range

Order Size will be based off Account Size and the risk per trade (user input) 

thats it...   

 for example
if GBPUSD was in the pair range

GBPUSD Weekly Candle [1] (previous candle) High Low Range is 200 pips
Breakout %(user input) is 30%
Stop Loss %(user input) is 20%
Account Risk % is 1%, assume current account size is $5000

then

Buystop will be CurrentPrice + 0.30x200, with a StopLoss of 0.20x200
Sellstop will be CurrentPrice - 0.30x200, with a StopLoss of 0.20x200

Order Size will be 1% of $5000 = $50 = the StopLoss (0.20x200) = 40 pips

easy? 

反馈

1
开发者 1
等级
(190)
项目
233
56%
仲裁
13
15% / 54%
逾期
43
18%
空闲
2
开发者 2
等级
(328)
项目
538
66%
仲裁
53
21% / 40%
逾期
169
31%
空闲
发布者: 1 代码
3
开发者 3
等级
(106)
项目
314
49%
仲裁
42
52% / 19%
逾期
22
7%
空闲
4
开发者 4
等级
(64)
项目
144
46%
仲裁
19
42% / 16%
逾期
32
22%
空闲

项目信息

预算
10 USD
截止日期
 1  2 天