stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Script for placing pending orders
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1325
Page 3 of 5
Author:  SteveHopwood [ Sun Aug 25, 2013 12:11 pm ]
Post subject:  Re: Script for placing pending orders

sini wrote:
SteveHopwood wrote:
sini wrote:
SteveHopwood wrote:
fx8000 wrote:The sell script is giving rise to error (4107) : invalid price parameter for trade function.

This may be caused by the sell script

price = xxx - SubtractFromLow - xxx, instead of price = xxx - SubtractFromLowPips - xxx,

because the code failed to make a call to extern int SubtractFromLowPips = xxx ?

A typo error ?

The buy script works just fine.

pete
SubtractFromLow is a doubles converter for for the int SubtractFromLowPips , and is set in init(). An integer divided by factor results in zero, which is why the int needs converting.

I present users with integer inputs that the code then converts, so they will enter pips as pips and not be bugged by the x digit bollocks.

:D

Hi Steve,

Why we have a spread calculated in the sell script? We need it only in the buy script. If we want to set up sell stop we need only Subtract form low pips not spread because spread will be calculated on the closing of the trade! For example if low from last candle is 1.3300 we need trade on the 1.3298 (2 pips bellow) but we get trade 2 pips bellow + spread, if spread is two pips our sell will be opened at 1.3296 instead of 1.3298, because of spread calculated in the script, but we know the criminal will take spread on the closing if we are in the sell.

Thank you in advance
Because that is what the op asked for.

:D
Please can you change this?
Thank you
Yep. Later on today.

:D
Author:  SteveHopwood [ Sun Aug 25, 2013 12:50 pm ]
Post subject:  Re: Script for placing pending orders

I have posted the script in post 2.

:D
Author:  sini [ Sun Aug 25, 2013 1:05 pm ]
Post subject:  Re: Script for placing pending orders

SteveHopwood wrote:I have posted the script in post 2.

:D
Hi,

Thank you, but now it opens exactly on the low of the previous candle, there is no spread but there is no 2 pips in Subtract from low pips on the last candle low. For example if low from last candle is 1.3300 we need trade on the 1.3298 (2 pips bellow) but we get trade exactly on 1.3300, please can you fix this.

Thank you in advance
Author:  SteveHopwood [ Sun Aug 25, 2013 1:40 pm ]
Post subject:  Re: Script for placing pending orders

Done. Post 2.

:D
Author:  sini [ Sun Aug 25, 2013 1:48 pm ]
Post subject:  Re: Script for placing pending orders

SteveHopwood wrote:Done. Post 2.

:D

Thank you very much Steve. :D
Author:  Ianski [ Tue Apr 08, 2014 1:12 pm ]
Post subject:  Script for placing pending orders

Hello everyone, I'm new to the Empty4 platform after trading on broker Web platforms for a while and found this site a couple of days ago while looking for a script/EA that places orders on the high/low of previous candles.
This script is almost exactly what I have been looking for. To be able to drag and drop a script onto a chart at 06.00 when I can barely see through the haze of early morning rise brain and eye freeze is fantastic. I love the candle shift element - this is just brilliant. I say almost because what would make this really useful is a breakeven point, jumping stop loss so that you can take advantage of the trade at say 30 or whatever PIP increments I see fit as it progresses without finding that the price went to +5000 PIP's ( exaggeration ) and then retraced to +10 PIP's or even worse taken out by the SL for a losing trade. It would almost be like finding out that you could have paid off the mortgage only to find that your earning would only take care of the toilet roll bill. Steve Hopwood, or anyone have you made any adjustments to this script to include these additional settings ? It would be fantastiche if you have.
Cheers for now
Ianski P
Author:  SteveHopwood [ Tue Apr 08, 2014 5:15 pm ]
Post subject:  Script for placing pending orders

Ianski » Tue Apr 08, 2014 1:12 pm wrote:Hello everyone, I'm new to the Empty4 platform after trading on broker Web platforms for a while and found this site a couple of days ago while looking for a script/EA that places orders on the high/low of previous candles.
This script is almost exactly what I have been looking for. To be able to drag and drop a script onto a chart at 06.00 when I can barely see through the haze of early morning rise brain and eye freeze is fantastic. I love the candle shift element - this is just brilliant. I say almost because what would make this really useful is a breakeven point, jumping stop loss so that you can take advantage of the trade at say 30 or whatever PIP increments I see fit as it progresses without finding that the price went to +5000 PIP's ( exaggeration ) and then retraced to +10 PIP's or even worse taken out by the SL for a losing trade. It would almost be like finding out that you could have paid off the mortgage only to find that your earning would only take care of the toilet roll bill. Steve Hopwood, or anyone have you made any adjustments to this script to include these additional settings ? It would be fantastiche if you have.
Cheers for now
Ianski P
http://www.stevehopwoodforex.com/phpBB3 ... ?f=21&t=64

:xm:
Author:  Ianski [ Wed Apr 09, 2014 5:47 pm ]
Post subject:  Script for placing pending orders

Nice one Mr Hopwood, I will have a play with this over the next few days on a demo account. There's a lot of setting so I may be at this for a while.

Cheers for now
Ianski
Author:  SteveHopwood [ Wed Apr 09, 2014 10:21 pm ]
Post subject:  Script for placing pending orders

Ianski » Wed Apr 09, 2014 5:47 pm wrote:Nice one Mr Hopwood, I will have a play with this over the next few days on a demo account. There's a lot of setting so I may be at this for a while.
Yes, you will.

Ask question in the mptm thread. I will not answer them because I produced a user guide specifically so I would not have to do so, but there is always a kindly soul wandering by with more patience than me.

:xm:
Author:  Ianski [ Wed Apr 09, 2014 10:41 pm ]
Post subject:  Script for placing pending orders

No problem, I downloaded the pdf so I should be ok. I like to demo things anyway rather than ask, that way I learn faster. I'm only about 15 minutes from your house anyway as I live on the East side of Sheffield should I get stuck ..... of course I'm only joking, its probably more like 20 mins.
All times are UTC Page 3 of 5