10.7 trading helpers by Steve and others

Post Reply
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.

10.7 trading helpers by Steve and others

Post by SteveHopwood »

kwchau » Mon May 05, 2014 7:06 am wrote:Hi Steve, I believe these EAs are designed to stop entering new trade after a trade is entered at Stoch 10. Is there a simple way to change the code such that it will also enter another trade at Stoch 30 after the first trade at Stoch 10 has entered?

Hope there is an easy way to do this ?
Nope, there is no easy way but I am about to take a bath..........................................

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

10.7 trading helpers by Steve and others

Post by SteveHopwood »

kwchau » Mon May 05, 2014 7:06 am wrote:Hi Steve, I believe these EAs are designed to stop entering new trade after a trade is entered at Stoch 10. Is there a simple way to change the code such that it will also enter another trade at Stoch 30 after the first trade at Stoch 10 has entered?

Hope there is an easy way to do this ?
Have a play with the attached and see if it works before I make the changes to the other ea's. I have:
  • added two new inputs - Trade1Comment & Trade2Comment. Taking a buy as an example, trade 1 is the cross of the 10, trade 2 the cross of the 30. The ea's have to know whether there is already a trade open at the relevant level, so I have used trade comments for identification.
  • added two more variables, Trade1Open and Trade2Open. CountOpenTrades() sets these to 'true' if it finds a trade with the appropriate comment.
  • added code to ReadIndicatorValues() to set the variable TradeComment to the relevant one, to save having to make a shed-load of changes elsewhere in the code.
  • changed the system specific code to: if ((StoCrossStatus == crosslong10 && !Trade1Open) || (StoCrossStatus == crosslong30 && !Trade2Open))
  • changed the conditions that allow LookForTradingOpportunities() to be called
I will create the other ea's if this one works.

:xm:
You do not have the required permissions to view the files attached to this post.
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.
twelve

10.7 trading helpers by Steve and others

Post by twelve »

Pressurized. Just eyed How 2 Do the DashBoard and that's magic - an amazing two pips.

Cheers,
kwchau
Trader
Posts: 305
Joined: Tue Jan 03, 2012 3:37 pm

10.7 trading helpers by Steve and others

Post by kwchau »

SteveHopwood » Mon May 05, 2014 8:55 pm wrote: Have a play with the attached and see if it works before I make the changes to the other ea's. I have:
  • added two new inputs - Trade1Comment & Trade2Comment. Taking a buy as an example, trade 1 is the cross of the 10, trade 2 the cross of the 30. The ea's have to know whether there is already a trade open at the relevant level, so I have used trade comments for identification.
  • added two more variables, Trade1Open and Trade2Open. CountOpenTrades() sets these to 'true' if it finds a trade with the appropriate comment.
  • added code to ReadIndicatorValues() to set the variable TradeComment to the relevant one, to save having to make a shed-load of changes elsewhere in the code.
  • changed the system specific code to: if ((StoCrossStatus == crosslong10 && !Trade1Open) || (StoCrossStatus == crosslong30 && !Trade2Open))
  • changed the conditions that allow LookForTradingOpportunities() to be called
I will create the other ea's if this one works.

:xm:
Thank you Steve, will test it and let you know !
kwchau
Trader
Posts: 305
Joined: Tue Jan 03, 2012 3:37 pm

10.7 trading helpers by Steve and others

Post by kwchau »

SteveHopwood » Mon May 05, 2014 8:55 pm wrote: Have a play with the attached and see if it works before I make the changes to the other ea's. I have:
  • added two new inputs - Trade1Comment & Trade2Comment. Taking a buy as an example, trade 1 is the cross of the 10, trade 2 the cross of the 30. The ea's have to know whether there is already a trade open at the relevant level, so I have used trade comments for identification.
  • added two more variables, Trade1Open and Trade2Open. CountOpenTrades() sets these to 'true' if it finds a trade with the appropriate comment.
  • added code to ReadIndicatorValues() to set the variable TradeComment to the relevant one, to save having to make a shed-load of changes elsewhere in the code.
  • changed the system specific code to: if ((StoCrossStatus == crosslong10 && !Trade1Open) || (StoCrossStatus == crosslong30 && !Trade2Open))
  • changed the conditions that allow LookForTradingOpportunities() to be called
I will create the other ea's if this one works.

:xm:
Hi Steve, I've put the EA to test on H1 charts, glad to report that the EA just triggered in three different instances Trade 1 and Trade 2 properly. It seems working as expected. In another instance, I dragged the EA to the chart when stoch is over 10 but below 30 without Trade 1, it entered Trade 2 when Stoch crossed 30, which is good.

There is also an instance that after Trade 1 was entered, because the price action was fast, Stoch 30 was crossed at the start of a new H1 bar, there was no Trade 2 entered. I believe Trade 2 was not entered due to maximum slippage of 5 pips was exceeded.
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.

10.7 trading helpers by Steve and others

Post by SteveHopwood »

kwchau » Mon May 05, 2014 3:01 pm wrote:
SteveHopwood » Mon May 05, 2014 8:55 pm wrote: Have a play with the attached and see if it works before I make the changes to the other ea's. I have:
  • added two new inputs - Trade1Comment & Trade2Comment. Taking a buy as an example, trade 1 is the cross of the 10, trade 2 the cross of the 30. The ea's have to know whether there is already a trade open at the relevant level, so I have used trade comments for identification.
  • added two more variables, Trade1Open and Trade2Open. CountOpenTrades() sets these to 'true' if it finds a trade with the appropriate comment.
  • added code to ReadIndicatorValues() to set the variable TradeComment to the relevant one, to save having to make a shed-load of changes elsewhere in the code.
  • changed the system specific code to: if ((StoCrossStatus == crosslong10 && !Trade1Open) || (StoCrossStatus == crosslong30 && !Trade2Open))
  • changed the conditions that allow LookForTradingOpportunities() to be called
I will create the other ea's if this one works.

:xm:
Hi Steve, I've put the EA to test on H1 charts, glad to report that the EA just triggered in three different instances Trade 1 and Trade 2 properly. It seems working as expected. In another instance, I dragged the EA to the chart when stoch is over 10 but below 30 without Trade 1, it entered Trade 2 when Stoch crossed 30, which is good.
Yes, and using a buy as an example because I think more easily in buy terms. As coded the ea should take Trade 2 if the price dips below, then rises above 30, it will take a Trade 2 even though there is no Trade 1. If the price plummets and the EA subsequently spots a Trade 1 opportunity, it will take it.

So, do you want me to create the additional ea's that equate to the original but allow two trades?

:xm:
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.
kwchau
Trader
Posts: 305
Joined: Tue Jan 03, 2012 3:37 pm

10.7 trading helpers by Steve and others

Post by kwchau »

SteveHopwood » Tue May 06, 2014 6:02 am wrote: Yes, and using a buy as an example because I think more easily in buy terms. As coded the ea should take Trade 2 if the price dips below, then rises above 30, it will take a Trade 2 even though there is no Trade 1. If the price plummets and the EA subsequently spots a Trade 1 opportunity, it will take it.

So, do you want me to create the additional ea's that equate to the original but allow two trades?

:xm:

Yes please, they are useful in a volatile market condition ! Your help is highly appreciated.
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.

10.7 trading helpers by Steve and others

Post by SteveHopwood »

I have put all four trade twice helpers into post 1. Old stagers know to be highly alarmed when they read this next statement: it involved a lot of copy/paste/edit. :oops: Good luck guys. Only an idiot uses them on a live account in his most vivid nightmares without demo-testing them first. Report copy/paste/edit bloops here.

I noticed that whilst the helpers were checking Stoch7 for trade closure opportunities at every tick, they were looking at the value at the close of the previous candle. This seems a tad pointless, so I have changed the code in all the helpers so that they look at the Stoch7 value at each tick and uploaded the new versions to post 1. Those of you who want to make the changes to your own files to preserve your hard-coded inputs:
  • go to bool LookForTradeClosure(int ticket)
  • scroll down to if (UseStoch7ForExit==true)
  • change the dStochMain[1] to dStochMain[0]
:xm:
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.
twelve

10.7 trading helpers by Steve and others

Post by twelve »

Report to front of house for pick-up by men in white coats. Not necessary, just kidding. The American band will come into your house....

I've read Tom Demarks how to trade the Trend Line, and that appears to address your code query: Drawing objective trendlines, Currency Trader September 2006.

The section of reference defines Upside breakout qualifiers and Downside breakout qualifiers.

Cheers,
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.

10.7 trading helpers by Steve and others

Post by SteveHopwood »

Looks like there are bloops in the trade twice helpers - my buy twice sent two Trade 1 trades. I will look into this.

:xm:
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 “Nanningbob 10.x”