| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Script for placing pending orders https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1325 |
Page 1 of 5 |
| Author: | Sgt.Forex [ Thu Dec 20, 2012 8:07 am ] |
| Post subject: | Script for placing pending orders |
Hi, does anyone of you have or know of a script that does the following: For Buy pending: When i drag it onto the chart, it will place a pending order X pips + Spread above LAST candles high? For Sell panding: The opposite... Cheers Philipp |
|
| Author: | SteveHopwood [ Thu Dec 20, 2012 12:18 pm ] |
| Post subject: | Re: Script for placing pending orders |
Here you are Philipp. CandleShift allows you to use the hi/lo of any candle you choose - defaults to the previous candle. I knocked these together this morning, so sing out if anything is not quite right. |
|
| Author: | Sgt.Forex [ Thu Dec 20, 2012 1:56 pm ] |
| Post subject: | Re: Script for placing pending orders |
Wow, nice one Steve! Thank you very much! I will report back. Cheers |
|
| Author: | Sgt.Forex [ Thu Dec 20, 2012 2:27 pm ] |
| Post subject: | Re: Script for placing pending orders |
Here is the report I am getting an error message: Code: Select all Cheers |
|
| Author: | SteveHopwood [ Thu Dec 20, 2012 3:04 pm ] |
| Post subject: | Re: Script for placing pending orders |
Works fine here/ Make sure you are using it when it can work - can't send a sell stop if the market is already lower than the low of the previous candle. |
|
| Author: | Sgt.Forex [ Thu Dec 20, 2012 3:33 pm ] |
| Post subject: | Re: Script for placing pending orders |
Hmm, ok i will retry. But the Price wasn`t lower, than the low of the previous candle. Cheers |
|
| Author: | Sgt.Forex [ Thu Dec 20, 2012 3:37 pm ] |
| Post subject: | Re: Script for placing pending orders |
Tried to use it on XAU/USD -> only the buystop worked. Tried to use it on EUR/CHF -> both worked. Maybe its a "Gold bug" ? Cheers |
|
| Author: | fx800 [ Sun Mar 03, 2013 11:13 am ] |
| Post subject: | Re: Script for placing pending orders |
Hi Steve, I am confused. Why is double spread = Ask - Bid, and not double spread = (Ask - Bid) * factor in your script code ? Code: Select all Peter |
|
| Author: | SteveHopwood [ Sun Mar 03, 2013 12:53 pm ] |
| Post subject: | Re: Script for placing pending orders |
Nice spot Peter. Thanks. I have a shell script that doesn't multiply the spread and I am so used to dividing it by factor when I use it, that I forgot. I have updated the scripts in post 2. |
|
| Author: | fx800 [ Sun Mar 03, 2013 3:12 pm ] |
| Post subject: | Re: Script for placing pending orders |
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 |
|
| All times are UTC | Page 1 of 5 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|