Buy/Sell scripts for Previous candles

Post Reply
wdpc18
Posts: 3
Joined: Thu Jan 05, 2012 9:30 pm

Buy/Sell scripts for Previous candles

Post by wdpc18 »

Afternoon,

Firstly thanks to Philipp's thread where i found the original buy/sell scripts for previous candles coded by Steve.. That thread can be found here :

http://www.stevehopwoodforex.com/phpBB3 ... =48&t=1325

They basically placed a PO above or below a user defined number of previous candles...

Using these as a base i asked Steve if he would make a couple of modifications for them. These were:

1. A SL to be placed at the opposite end of the same candle, with a user defined buffer

2. use a lotsize calculated using that SL value based on a % risk of account ...

3. a TP placed as a multiple of the SL used...

Steve kindly agreed and so i attach them here for everyones use... the additional inputs are:

If risk percent is 0 then the fixed lot size is used
if TPSLmultiplier is 0 then the take profit pips will be used
add to zero SL pips is the buffer you want to use above/below the candle, spread will also be added to this as well...

I have tested them on GKFX demo and live accounts and they work perfectly.

PLEASE TEST THEM YOURSELVES BEFORE USING ON A LIVE ACCOUNT SO YOU CAN SEE WHAT THEY DO.

again many many thanks Steve
many pips to you
Grant

ps the attached are source code so you can change the inputs to suit your TF and style...
You do not have the required permissions to view the files attached to this post.
SafariPip
Posts: 1
Joined: Thu Jan 16, 2014 9:24 am

Re: Buy/Sell scripts for Previous candles

Post by SafariPip »

Hello,

This is a great script, just what I need.

A question or two:

Can I put both buy and sell script on the same chart? Would I need to change the Magic Number.

Can I have buy and sell script on 3 different pairs? Again would I need 6 different Magic Numbers or would one for buy and one for sell be fine.

Thanks for the great scripts.
SafariPip
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Re: Buy/Sell scripts for Previous candles

Post by milanese »

SafariPip » Thu Jan 16, 2014 2:25 pm wrote:Hello,

This is a great script, just what I need.

A question or two:

Can I put both buy and sell script on the same chart? Would I need to change the Magic Number.

Can I have buy and sell script on 3 different pairs? Again would I need 6 different Magic Numbers or would one for buy and one for sell be fine.

Thanks for the great scripts.
SafariPip
Hello SafariPip :hi:

first a welcome here :)

These are scripts, a script will execute the start() function only once, when it's loaded. So you would need only different magic numbers if you want to use an EA for managing the trades after..

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
User avatar
Aussiedoc
Trader
Posts: 270
Joined: Tue Dec 13, 2011 8:10 am
Location: Western District. Victoria. Australia

Buy/Sell scripts for Previous candles

Post by Aussiedoc »

Hi!
For some time now I have been searching for a script I can use to set a pending Buy/Sell trade based upon the Open/Close of the previous candle.

Thanks to Steve, Phillip & Grant I reckon that I almost have the answer. :clap: :clap:

The two scripts that Grant posted
http://www.stevehopwoodforex.com/phpBB3 ... p?id=20508
http://www.stevehopwoodforex.com/phpBB3 ... p?id=20507
are pretty-much exactly what I need - except for one thing!

Both of these work brilliantly on the High/Low of the designated previous candle . . . But what I need is the same concept -- working upon the Open/Close values.

My question/request is . . Is it at all possible to change/alter/modify the above scripts to do that . . . And if so, can I put in a request to have it done?

Thanks for your time now . . Very much appreciated! :good: :good:
Take care.
Cheers
Doc
If you can never exceed your own expectations - why expect second-best?
User avatar
goodo
Trader
Posts: 35
Joined: Thu Mar 23, 2017 10:31 pm

Buy/Sell scripts for Previous candles

Post by goodo »

wdpc18 » Mon Apr 15, 2013 1:47 pm wrote:Afternoon,

Firstly thanks to Philipp's thread where i found the original buy/sell scripts for previous candles coded by Steve.. That thread can be found here :

http://www.stevehopwoodforex.com/phpBB3 ... =48&t=1325

They basically placed a PO above or below a user defined number of previous candles...

Using these as a base i asked Steve if he would make a couple of modifications for them. These were:

1. A SL to be placed at the opposite end of the same candle, with a user defined buffer

2. use a lotsize calculated using that SL value based on a % risk of account ...

3. a TP placed as a multiple of the SL used...

Steve kindly agreed and so i attach them here for everyones use... the additional inputs are:

If risk percent is 0 then the fixed lot size is used
if TPSLmultiplier is 0 then the take profit pips will be used
add to zero SL pips is the buffer you want to use above/below the candle, spread will also be added to this as well...

I have tested them on GKFX demo and live accounts and they work perfectly.

PLEASE TEST THEM YOURSELVES BEFORE USING ON A LIVE ACCOUNT SO YOU CAN SEE WHAT THEY DO.

again many many thanks Steve
many pips to you
Grant

ps the attached are source code so you can change the inputs to suit your TF and style...

These scripts are very useful. Would it be possible for someone to port them for MT5? Maybe use 10% ATR for the buffer?
User avatar
SteveHopwood
Owner
Posts: 9754
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Buy/Sell scripts for Previous candles

Post by SteveHopwood »

Here is the thingy. Not many of us give a hoot for CrapT5. The Cretins at Crapperquotes could not even get Empty4 to work properly, let alone a new variant. Think of us as regarding the Morons at Microsoft as being more brainy.

Many of us have years invested in Empty4 stuff. It works because we battered the Cretins at Crapperquotes until they made their pathetic platform actually work. It is quite good these days.

A few years ago, the Cretins at Crapperquotes were trying to phase out Empty4. Here is what I think happened: traders told their so-called, "brokers" that they had such a lot invested in Empty4 software (i.e. .mql4) that they would move instantly to a different so-called, "broker" should said, "broker" insist that they migrate to CrapT5. I am guessing that even the Cretins at Crapperquotes saw the writing on the wall and backed off following pressure from the, "brokers".

Notably, the broker of trust at SHF, and incidentally the only broker I have ever trusted has: never tried to foist this rubbish on us; do not even offer CrapT5 as an option.

So, you are unlikely to attract much interest. None from me, for sure.

:xm: :rocket:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. [email protected] is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
Post Reply

Return to “Scripts”