Ghostrider

Post Reply
Pipstubborn
Trader
Posts: 272
Joined: Thu Jul 12, 2012 5:17 pm

Ghostrider

Post by Pipstubborn »

Thanks for sharing David.

Pipstubborn
Maximilian
Trader
Posts: 150
Joined: Sat Sep 06, 2014 2:43 pm

Ghostrider

Post by Maximilian »

First:
:yahoo: :yahoo: :yahoo: :yahoo: :yahoo: :yahoo: :yahoo:
for the possible end of such a bad situation.
:party: :party: :party: :party: :party: :party: :party:
Second:
Did anybody get a BUY grid even in older versions? I didn´t find any. I already did a fresh Empty4 install but to no avail.
Cheers Maximilian
Maximilian
Trader
Posts: 150
Joined: Sat Sep 06, 2014 2:43 pm

Ghostrider

Post by Maximilian »

Hi all,
I eventually found the code preventing Ghostie to send a buy grid with my setup. :yahoo: :yahoo: :yahoo: :yahoo: Took me a few days. Sounds obvious if you know how to code and what to look for but well...
Ghostie has a safety feature in the SendBuyGrid function which checks if the takeprofit is higher as the actual price of the stop order, if not it stops trying to send a grid. If you, like me hadn´t set a take profit in first place, no global variable is set as take profit, therefore the BuyGrid function sets the take to 0 and voila here we go: no buy grid.
The same check doesn´t matter in the sellgrid function because well, the price could always go towards zero.
Anyhow I am happy for myself to solve this one, because it was driving me nuts to see Ghostie open sellgrids but not buygrids.
Cheers Maximilian
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Ghostrider

Post by SteveHopwood »

Maximilian » Mon Dec 14, 2020 1:56 pm wrote:Hi all,
I eventually found the code preventing Ghostie to send a buy grid with my setup. :yahoo: :yahoo: :yahoo: :yahoo: Took me a few days. Sounds obvious if you know how to code and what to look for but well...
Ghostie has a safety feature in the SendBuyGrid function which checks if the takeprofit is higher as the actual price of the stop order, if not it stops trying to send a grid. If you, like me hadn´t set a take profit in first place, no global variable is set as take profit, therefore the BuyGrid function sets the take to 0 and voila here we go: no buy grid.
The same check doesn´t matter in the sellgrid function because well, the price could always go towards zero.
Anyhow I am happy for myself to solve this one, because it was driving me nuts to see Ghostie open sellgrids but not buygrids.
Cheers Maximilian
Wonderful stuff Maximilian and thanks again. :clap: :clap: :clap:

This is one of those, "Thingies I did not think of," thingy. I did not think to cater for people sending a grid without a take profit. I will include the fix in the next release.

: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. pianodoodler@hotmail.com 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.
Maximilian
Trader
Posts: 150
Joined: Sat Sep 06, 2014 2:43 pm

Ghostrider

Post by Maximilian »

Hey Steve,
I think in the CandleOK function there a parenthesis is missing:

double midPoint = (iHigh(Symbol(),LowerZzTimeFrame, 1) + iLow(Symbol(),LowerZzTimeFrame, 1) / 2);
should be

double midPoint = ((iHigh(Symbol(),LowerZzTimeFrame, 1) + iLow(Symbol(),LowerZzTimeFrame, 1)) / 2);

because of dividing before adding rule (don´t know the English term)

Cheers,
Max
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Ghostrider

Post by SteveHopwood »

Maximilian » Tue Dec 15, 2020 1:49 pm wrote:Hey Steve,
I think in the CandleOK function there a parenthesis is missing:

double midPoint = (iHigh(Symbol(),LowerZzTimeFrame, 1) + iLow(Symbol(),LowerZzTimeFrame, 1) / 2);
should be

double midPoint = ((iHigh(Symbol(),LowerZzTimeFrame, 1) + iLow(Symbol(),LowerZzTimeFrame, 1)) / 2);

because of dividing before adding rule (don´t know the English term)

Cheers,
Max
Thanks again Max. Hugely appreciated. :clap: :clap: :clap: Only someone with a better grasp of maths than I can confirm this but I will add the extra bracket anyway. I am a little surprised I did not do so in the first place - I bracket pretty much everything. :lol:

: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. pianodoodler@hotmail.com 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.
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Ghostrider

Post by SteveHopwood »

V 1e is in post 1, with the edits pointed out by Max.

A DIY is simple.

Do a search for:
if (take < price)

Add an extra conditional so that the snippet looks like this:

Code: Select all

      //And another
      if (!CloseEnough(take, 0) )
         if (take < price)
            return;
Then do a search for:
double midPoint = (iHigh(Symbol(),LowerZzTimeFrame, 1) + iLow(Symbol(),LowerZzTimeFrame, 1) / 2);

Add the extra brackets:
double midPoint = ((iHigh(Symbol(),LowerZzTimeFrame, 1) + iLow(Symbol(),LowerZzTimeFrame, 1)) / 2);

: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. pianodoodler@hotmail.com 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.
User avatar
tomele
Administrator
Posts: 1208
Joined: Tue May 17, 2016 3:40 pm
Location: Germany, Forest of Odes, Defending the Limes

Ghostrider

Post by tomele »

Maximilian » 15 Dec 2020, 15:49 wrote:... because of dividing before adding rule (don´t know the English term)
Hi Max.

You are absolutely right. One common english term is "operator precedence". A general summary can be found here: https://en.wikipedia.org/wiki/Order_of_operations. For MQ4, it is fully explained here: https://docs.mql4.com/basis/operations/rules.

Stay well and safe.
Happy pippin, Thomas :-BD

It ain't what you don't know that gets you into trouble.
It's what you know for sure that just ain't so.
(Mark Twain)

Keep the coder going: Donate
Maximilian
Trader
Posts: 150
Joined: Sat Sep 06, 2014 2:43 pm

Ghostrider

Post by Maximilian »

Thanks for the links, Thomas,

Max
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Ghostrider

Post by SteveHopwood »

Just making sure you have seen folks, that Thomas has posted TDesk 7.3 along with a full user guide. Usual place: viewtopic.php?p=163522#p163522

Thanks Thomas. :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :clap: :party: :party: :party: :party: :party: :party: :party: :party: :party: :party: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!: :!!:
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. pianodoodler@hotmail.com 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 “Automated trading systems”