Hi,
I'm not sure if this is the right tread to post this, but being a junior member i can't open a tread...
I am looking for a simple script the will place orders for my manual trading
Since i have no idea how to program, i'm hoping for a little help from this great community
First I should say I 'think' a script will do the job better then an expert advisor
because I need to be able to attach it fast to different symbols/ time frames
and a hotkey assigned to the script would suit this perfectly
What it should do:
(examlpe for a buy order, obviously same but reverse for short)
when attached,
the script should look at the previous bar and place a pending buy stop order at the high of this (previous) bar + 1 tick (including spread)
with a sell stop order at the low of that same bar -1 tick
it should have a MM option,where either it will trade a fixed lot size
or it will place an order size where the risk is a % of the account size
in the latter, it will calculate the range of this (previous) bar , including spread and use this range to calculate the order size.
My account is in € so it will have to use the value/pip is €
simple example MM :
price of the EUR/USD = 1.3000 (pip value= 7.69€)
Account size =10000€
MM risk =1% account size (100€ risk)
range of the previous bar ( risk) = 10 pips (76.9 € risk)
So it will place a pending buy stop order for 1.3 lots (100€/ 76.9)
One other option is where or not to use a TP
input for the TP should be used defined in function of the risk
let's say we put in a 2:1 RR,
then the order would have a TP attached at 2O pips profit
The pending order should have life time equal to the TF the script is attached,
for example if the script is attached to 15 min chart bar, the pending orders should be canceled if not filled
by the time this 15 min candle closes, and so for 1h, daily,...;
ps:
I can see one problem here and I have no idea what the solution would be
and that is when the high/low of the previous bar is to close to the actual
price and the min distance allow by the broker to place pending order is not met at the time the script is attached ...?
To anybody how is willing to help me out here:
Many thanks in advance, your help is highly appreciated !
I'm not sure if this is the right tread to post this, but being a junior member i can't open a tread...
I am looking for a simple script the will place orders for my manual trading
Since i have no idea how to program, i'm hoping for a little help from this great community
First I should say I 'think' a script will do the job better then an expert advisor
because I need to be able to attach it fast to different symbols/ time frames
and a hotkey assigned to the script would suit this perfectly
What it should do:
(examlpe for a buy order, obviously same but reverse for short)
when attached,
the script should look at the previous bar and place a pending buy stop order at the high of this (previous) bar + 1 tick (including spread)
with a sell stop order at the low of that same bar -1 tick
it should have a MM option,where either it will trade a fixed lot size
or it will place an order size where the risk is a % of the account size
in the latter, it will calculate the range of this (previous) bar , including spread and use this range to calculate the order size.
My account is in € so it will have to use the value/pip is €
simple example MM :
price of the EUR/USD = 1.3000 (pip value= 7.69€)
Account size =10000€
MM risk =1% account size (100€ risk)
range of the previous bar ( risk) = 10 pips (76.9 € risk)
So it will place a pending buy stop order for 1.3 lots (100€/ 76.9)
One other option is where or not to use a TP
input for the TP should be used defined in function of the risk
let's say we put in a 2:1 RR,
then the order would have a TP attached at 2O pips profit
The pending order should have life time equal to the TF the script is attached,
for example if the script is attached to 15 min chart bar, the pending orders should be canceled if not filled
by the time this 15 min candle closes, and so for 1h, daily,...;
ps:
I can see one problem here and I have no idea what the solution would be
and that is when the high/low of the previous bar is to close to the actual
price and the min distance allow by the broker to place pending order is not met at the time the script is attached ...?
To anybody how is willing to help me out here:
Many thanks in advance, your help is highly appreciated !