hello
i really hate asking for this, but i have a seemingly simple EA i am trying to code. Thing is, i cant make it function properly. So i come with my hat in my hand and asking for help
The EA is simple;
- if bar closes up, place buy order and a sellstop on previous open
- if next bar closes up, delete the pending order and repeat the process
- if the pending sellstop is triggered, close the open buy and place a buystop where the original buy was.
- repeat the process with placing pending orders until the bar closes
- i know some will hate me now, but it will be martingale orders. dont need the lecture, i have experience with martingale and this is part of the plan
opposite for sell, buystop place on previous open and so on
some settings that should be user adjustable
- initial lot
- use stoploss/takeprofit = true/false
- stoploss
- takeprofit
- magicnumber
-
my problem is with the placing of the third, fourth, fifth, ....... pending orders, and espescially with reliably deleting the pending orders on bar close
hope someone are able to help me with this
i really hate asking for this, but i have a seemingly simple EA i am trying to code. Thing is, i cant make it function properly. So i come with my hat in my hand and asking for help
The EA is simple;
- if bar closes up, place buy order and a sellstop on previous open
- if next bar closes up, delete the pending order and repeat the process
- if the pending sellstop is triggered, close the open buy and place a buystop where the original buy was.
- repeat the process with placing pending orders until the bar closes
- i know some will hate me now, but it will be martingale orders. dont need the lecture, i have experience with martingale and this is part of the plan
opposite for sell, buystop place on previous open and so on
some settings that should be user adjustable
- initial lot
- use stoploss/takeprofit = true/false
- stoploss
- takeprofit
- magicnumber
-
my problem is with the placing of the third, fourth, fifth, ....... pending orders, and espescially with reliably deleting the pending orders on bar close
hope someone are able to help me with this