Round Number Trap!

Place your new trading idea here to see if someone can automate it.
magft
Trader
Posts: 195
Joined: Tue Nov 15, 2011 9:59 pm
Location: East Midlands, UK

Re: Round Number Trap!

Post by magft »

Here is the first version, though i think it is not exactly right at the moment.

Can you test it and report back as i need to do some other things now?

Thanks

Mike
You do not have the required permissions to view the files attached to this post.
User avatar
Alpenkorps
Trader
Posts: 213
Joined: Thu Dec 15, 2011 4:03 am

Re: Round Number Trap!

Post by Alpenkorps »

magft wrote:Here is the first version, though i think it is not exactly right at the moment.

Can you test it and report back as i need to do some other things now?

Thanks

Mike
It seems to me that lots are not multiplying. Everything else is working fine.
I'll do more test and let you know.

I could be wrong (I have this amazing ability about messing up EA's settings) so could you please check again? Martingale set to true, lot multi set to 2.
Last edited by Alpenkorps on Thu Jan 19, 2012 4:46 pm, edited 1 time in total.
Take my love, take my land, Take me where I cannot stand
I don't care, I'm still free, You can't take the sky from me
magft
Trader
Posts: 195
Joined: Tue Nov 15, 2011 9:59 pm
Location: East Midlands, UK

Re: Round Number Trap!

Post by magft »

Use this version, i had added some bugs whilst messing around with the code!!

This still isnt quite right though.
You do not have the required permissions to view the files attached to this post.
User avatar
Alpenkorps
Trader
Posts: 213
Joined: Thu Dec 15, 2011 4:03 am

Re: Round Number Trap!

Post by Alpenkorps »

magft wrote:Use this version, i had added some bugs whilst messing around with the code!!

This still isnt quite right though.
Martingale working now. But there are still some problems in taking orders.
Take my love, take my land, Take me where I cannot stand
I don't care, I'm still free, You can't take the sky from me
magft
Trader
Posts: 195
Joined: Tue Nov 15, 2011 9:59 pm
Location: East Midlands, UK

Re: Round Number Trap!

Post by magft »

Alpenkorps wrote:
magft wrote:Use this version, i had added some bugs whilst messing around with the code!!

This still isnt quite right though.
Martingale working now. But there are still some problems in taking orders.
If possible could you draw on a chart from last couple of days the trades the EA should have taken so i can then test in ST. Or can you describe what is wrong so i know what to fix.

Thanks

Mike
magft
Trader
Posts: 195
Joined: Tue Nov 15, 2011 9:59 pm
Location: East Midlands, UK

Re: Round Number Trap!

Post by magft »

Okay, done another rewrite of the code and it seems to work for SL as well as TP now finally :roll:

Try this one and if you are happy with it i'll open a new tread for others to test. This has been a real logic nightmare with several coding bloops that were difficult to spot! Anyway i learnt more about pending trades so all good.

Mike
You do not have the required permissions to view the files attached to this post.
User avatar
Alpenkorps
Trader
Posts: 213
Joined: Thu Dec 15, 2011 4:03 am

Re: Round Number Trap!

Post by Alpenkorps »

EA works up to level 2 nicely. At level 3 it doesn't increase the lot size, But then again, does for level 4.
Attached image is an example.
Arrow 1 = Closed 0.1 lot
Arrow 2 = Closed 0.2 lot
Arrow 3 = Closed 0.2 lot (it should be 0.4)
Arrow 4 = Closed 0.4 lot (ok considering last lot, but overall should be 0.8)

Thank you for your work so far Mike, we are almost there :)
You do not have the required permissions to view the files attached to this post.
Take my love, take my land, Take me where I cannot stand
I don't care, I'm still free, You can't take the sky from me
magft
Trader
Posts: 195
Joined: Tue Nov 15, 2011 9:59 pm
Location: East Midlands, UK

Re: Round Number Trap!

Post by magft »

Alpenkorps wrote:EA works up to level 2 nicely. At level 3 it doesn't increase the lot size, But then again, does for level 4.
Attached image is an example.
Arrow 1 = Closed 0.1 lot
Arrow 2 = Closed 0.2 lot
Arrow 3 = Closed 0.2 lot (it should be 0.4)
Arrow 4 = Closed 0.4 lot (ok considering last lot, but overall should be 0.8)

Thank you for your work so far Mike, we are almost there :)

That is very strange, but doesnt suprise me :roll: I will check the sequencing again it must still be a typo like in the last version i missed!

Have I added everything you requested at first? Once i have fixed this bug i will open a new thread for serious testing. Do you want lines drawn at the round numbers? I noticed in the picture you had added one, so i could get it to draw nearest two numbers or even all the ones listed in the user display (half round, round and big numbers high and low).

Regards

Mike
User avatar
Alpenkorps
Trader
Posts: 213
Joined: Thu Dec 15, 2011 4:03 am

Re: Round Number Trap!

Post by Alpenkorps »

magft wrote:
Have I added everything you requested at first? Once i have fixed this bug i will open a new thread for serious testing. Do you want lines drawn at the round numbers? I noticed in the picture you had added one, so i could get it to draw nearest two numbers or even all the ones listed in the user display (half round, round and big numbers high and low).

Regards

Mike
Yes everything is there, I cant think of something else. A forced margin check would be good, but not essential. And I would like to clear another point, Pending orders are placed +/- 10 pips from the round numbers, not according to the open order or anything. Stop loss and Take profit are placed after a PO gets triggered because of the slippage.

No need to draw the lines, you are already fighting enough problems. I have found an indi that can draw the lines (attached).

Thank You.
You do not have the required permissions to view the files attached to this post.
Take my love, take my land, Take me where I cannot stand
I don't care, I'm still free, You can't take the sky from me
magft
Trader
Posts: 195
Joined: Tue Nov 15, 2011 9:59 pm
Location: East Midlands, UK

Re: Round Number Trap!

Post by magft »

Alpenkorps wrote:
magft wrote:
Have I added everything you requested at first? Once i have fixed this bug i will open a new thread for serious testing. Do you want lines drawn at the round numbers? I noticed in the picture you had added one, so i could get it to draw nearest two numbers or even all the ones listed in the user display (half round, round and big numbers high and low).

Regards

Mike
Yes everything is there, I cant think of something else. A forced margin check would be good, but not essential. And I would like to clear another point, Pending orders are placed +/- 10 pips from the round numbers, not according to the open order or anything. Stop loss and Take profit are placed after a PO gets triggered because of the slippage.

No need to draw the lines, you are already fighting enough problems. I have found an indi that can draw the lines (attached).

Thank You.
Scoobs and ForexKiwi margin checks are in there already. Currently i have set the EA to enter the PO and then once order is in place it then uses the order open price, this should include any slippage, to add on SL/TP as per your original description. When a PO is deleted and lot size doubled i do take the order open price and use that at the moment but i can change this to the round number again as that sounds more like what you mean. I'll do this for the thread version later on, adding lines is fine as i have the code already if you want it. If your happy with the extra indy then i'll leave it.

Regards

Mike
Post Reply

Return to “Ideas for Possible Automation”