System needs development

 

Hello Trader, Programmer and Developer!

At first i excuse me for my worse english grammar.

I have an idea to develop an automatic trading system and i need help to code it.

I want tell you the system with an example (please look the pic):

At the yellow dot the system started with two pending orders:

1. Pending-Buy-Order @ 1,38250 -> TP 25 Pips @ 1,38500 -> SL 25 Pips @ 1,38000

2. Pending-Sell-Order @ 1,38000 -> TP 25 Pips @ 1,37750 -> SL 25 Pips @ 1,38250

Current price must be checked and then upper limit and lower limit must be calculate at this facts:

If price is between 1,38000 and 1,38249, then upper limit is 1,38250 and lower limit is 1,38000.

If price is between 1,38250 and 1,38499, then upper limit is 1,38500 and lower limit is 1,38250.

If price is between 1,38500 and 1,38749, then upper limit is 1,38750 and lower limit is1,38500.

And if the price is between 1,38750 and 1,38999, then upper limit is 1,39000 and lower limit is1,38750.

Distance is 25 Pips.

At first red dot Buy-Pending-Order @ 1,38250 executed. Then Pending-Sell-Order @ 1,38000 should be cancelt and new Buy-Pending-Order set @ 1,38500 (TP and SL 25 Pips again). Also new Sell-Pending-Order set @ 1,38250.

Detail example for the pic:

Yellow dot started:

Set BuyStop @ 1,38250 -> TP 25 Pips -> SL 25 Pips

Set SellStop @ 1,38000 -> TP 25 Pips -> SL 25 Pips

1. red dot:

BuyStop @ 1,38250 execute

SellStop @ 1,38000 delete

New BuyStop @ 1,38500

New SellStop @ 1,38250

2. red dot:

BuyStop @ 1,38500 execute

SellStop @ 1,38250 delete

New BuyStop @ 1,38750

New SellStop @ 1,38500

3. red dot:

BuyStop @ 1,38750 execute

SellStop @ 1,38500 delete

New BuyStop @ 1,39000

New SellStop @ 1,38750

4. red dot:

BuyStop @ 1,39000 delete

SellStop @ 1,38750 execute

New BuyStop @ 1,38750

New SellStop @ 1,38500

5. red dot:

BuyStop @ 1,38750 execute

SellStop @ 1,38500 delete

New BuyStop @ 1,39000

New SellStop @ 1,38750

But here at the 5. red dot I think we must check that only two pending orders can be possible (only one buystop and one sellstop @ the same price), because if the chart does range trading, there are too many pending orders open.

At 6. red dot:

BuyStop @ 1,39000 execute

SellStop @ 1,38750 delete

New BuyStop @ 1,39250

New SellStop @ 1,39000

...and so on...(all orders have TP and SL 25 Pips)

Is it possible to create an expert advisor? Please don't ask why i want do trade like this. I have an idea and i want watch this for longer time.

Please can somebody create a code if someone knows what i mean?

If you have questions about my system (maybe it was no system), please ask me.

Thanks for the trouble and sorry for the grammar!

Kind regards

mondalsys

 

Doesn't anybody help me?

Reason: