Gday Mark 2

Post Reply
User avatar
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Gday Mark 2

Post by gaheitman »

SteveHopwood wrote:Shelly, I cannot see any reason for those strange part-closures. The code that calls the part-closure function is enclosed within a conditional that demands that the trade be in profit before the part=closure function is called. My live account did not take these trades because I will not sell the high-swap pairs. My demo did and has not replicated the problem.

So, no idea what caused it. Maybe the other coders can see something wrong? All the management features are called from within CountOpenTrades().

:D
Steve,

In CountOpenTrades(), the code:

Code: Select all

    if (OrderType() == OP_SELL && OrderStopLoss() <= OrderOpenPrice() && OrderLots() == Lot)
            {
               PartCloseThisTrade();
            }//if (OrderType() == OP_SELL)
would seem to be the culprit. The only test to get here is that OrderProfit() > 0. Since there is no StopLoss, OrderStopLoss() will be <= OrderOpenPrice(), giving us the impression that we have either hit BE or moved our SL down....

There also seems to be an issue a bit further down.

Code: Select all

            if (OrderType() == OP_SELL && OrderStopLoss() >= OrderOpenPrice() - (BreakEvenProfit / factor) - JumpingStopPips && OrderLots() > PartLot)
            {
               PartCloseThisTrade();
            }//if (OrderType() == OP_BUY && OrderStopLoss() >= OrderOpenPrice() 
Don't you want it to be OrderStopLoss() <= OrderOpenPrice()... ?

Also, I can't tell if jumping stop was set or not, but I believe if it is not then this code:

Code: Select all

            if (pp >= (JumpingStopPips * 2) && OrderLots() > PartLot) PartCloseThisTrade();
will incorrectly call PartCloseThisTrade().

George
garyfritz

Re: Gday Mark 2

Post by garyfritz »

cosmo wrote:I have also been running G’day on another account using an alternative to 7.2.2. Stochastic, the De Mark Tendline, using the DMT I would not have taken any of the losers and would be well ahead, it is also less subjective and easy to follow, buy/sell on cross of trendline on the open of a new daily bar, see rules below.
Stochastic is already pretty objective!

cosmo, you say you're "running G'day using the DMT." The DMT technique described in the doc file is nothing like Gday. It opens on a break of a trendline, and closes at a price projection. Gday opens at a specified Stochastic behavior (in & out of OB/OS) and closes at specified pip targets. So how are you applying DMT to Gday?
MrLong

Re: Gday Mark 2

Post by MrLong »

Hello Traders,

Gday system, seems to like M15 TF.
You do not have the required permissions to view the files attached to this post.
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.

Re: Gday Mark 2

Post by SteveHopwood »

gaheitman wrote:
SteveHopwood wrote:Shelly, I cannot see any reason for those strange part-closures. The code that calls the part-closure function is enclosed within a conditional that demands that the trade be in profit before the part=closure function is called. My live account did not take these trades because I will not sell the high-swap pairs. My demo did and has not replicated the problem.

So, no idea what caused it. Maybe the other coders can see something wrong? All the management features are called from within CountOpenTrades().

:D
Steve,

In CountOpenTrades(), the code:

Code: Select all

    if (OrderType() == OP_SELL && OrderStopLoss() <= OrderOpenPrice() && OrderLots() == Lot)
            {
               PartCloseThisTrade();
            }//if (OrderType() == OP_SELL)
would seem to be the culprit. The only test to get here is that OrderProfit() > 0. Since there is no StopLoss, OrderStopLoss() will be <= OrderOpenPrice(), giving us the impression that we have either hit BE or moved our SL down....

There also seems to be an issue a bit further down.

Code: Select all

            if (OrderType() == OP_SELL && OrderStopLoss() >= OrderOpenPrice() - (BreakEvenProfit / factor) - JumpingStopPips && OrderLots() > PartLot)
            {
               PartCloseThisTrade();
            }//if (OrderType() == OP_BUY && OrderStopLoss() >= OrderOpenPrice() 
Don't you want it to be OrderStopLoss() <= OrderOpenPrice()... ?

Also, I can't tell if jumping stop was set or not, but I believe if it is not then this code:

Code: Select all

            if (pp >= (JumpingStopPips * 2) && OrderLots() > PartLot) PartCloseThisTrade();
will incorrectly call PartCloseThisTrade().

George
A couple of really helpful spots in their George. Thanks. I am always forgetting to check that sells actually have a stop loss. :oops:

I still do not see how the code reached that point as the trade has to be in profit first and Shelley's were not. I noticed in Shelley's pic that Gday had made attempts to part-close and that this generated an invalid ticket error.

Just in case this is yet another example of Crapql4 not doing what it says in the documentation and was looking at a closed and profitable trade in the History list, I have added MODE_TRADES to the OrderSelect command.

Coders, you might want to add if (OrderCloseTime() > 0) continue; as well. I will do this in the next release.

Note to newbie coders: I am learning not to trust the Crapql4 documentation and to declare variables explicitly. Do not rely on the 'default' values described in the documentation. The proper coders here tell me this is just basic good practise anyhow.

Version 1e is in post 1, with the fixes for the bloops George picked up on. This is an essential download.

Also, George sent me a very neat chart history check that leaves us with the best of all possible worlds. The code is right at the top of start() and the two functions you need are immediately above start. You want to pinch and edit this and use it in your own shells. I am about to add it to mine.

Thanks again George. Invaluable help.

:D
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.

Re: Gday Mark 2

Post by SteveHopwood »

I am loading the update onto my accounts and notice that OnlyTradePositiveSwap is enabled by default. This will cut out a lot of trades, so I recommend you change it to 'false'.

:D
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
gaheitman
Trader
Posts: 655
Joined: Tue Nov 15, 2011 10:55 pm
Location: Richmond, VA, US

Re: Gday Mark 2

Post by gaheitman »

SteveHopwood wrote: A couple of really helpful spots in their George. Thanks. I am always forgetting to check that sells actually have a stop loss. :oops:

I still do not see how the code reached that point as the trade has to be in profit first and Shelley's were not. I noticed in Shelley's pic that Gday had made attempts to part-close and that this generated an invalid ticket error.
I think the trade was just barely in profit. According to the log, it closed the sell that was opened at 1.03390 at 1.03382. Well, that's what it tried to do, it slipped a bit.

I think the partial close that failed was called within the came call to CountOpenTrades(). That's why it had the invalid ticket number. When it partially closed the first trade, the remaining trade got a new number, so it couldn't do another partial close. That's what led me to wonder if she had JumpingStops off.

George
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.

Re: Gday Mark 2

Post by SteveHopwood »

I just had a new D1 candle open on my live account. G took buys on audnzd and eurgbp.

What the Hell am I doing selling nzd. That positive swap on the pair better be good. :lol:

What the Hell am I doing trading the nzd at all? The spread is criminal.

Note to myself: remove anything to do with nzd at the earliest possible opportunity.

:D
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
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

Re: Gday Mark 2

Post by fxozgirl »

Thanks for the fix George & the update Steve :D

I missed getting it on for the new candle today, but v1c took nzdjpy
MrLong

Re: Gday Mark 2

Post by MrLong »

Morning Traders,

Here is a fresh M15 basket started at GMT 20:30 last night, hopfully I will upload the EA later today, you will have the option to trade any timeframe.

Best Regards
Andy
You do not have the required permissions to view the files attached to this post.
User avatar
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

Re: Gday Mark 2

Post by fxozgirl »

MrLong wrote:Morning Traders,

Here is a fresh M15 basket started at GMT 20:30 last night, hopfully I will upload the EA later today, you will have the option to trade any timeframe.

Best Regards
Andy
Very nice Andy...looking forward to your EA :D

Thanks for sharing!
Post Reply

Return to “Automated trading systems”