10.7 trading helpers by Steve and others

Post Reply
User avatar
SpiderX
Trader
Posts: 554
Joined: Thu Aug 22, 2013 4:50 pm

10.7 trading helpers by Steve and others

Post by SpiderX »


Was wondering if it should be

Code: Select all

      if (CloseEnough(DailyStochMain, 0))
         if(CloseEnough(HT2StochMain, 100))
instead of

Code: Select all

      if (DailyStochMain == 0)
         if(HT2StochMain == 100)
Dont think it should be a big deal though.

Cheers
"Love is patient, love is kind. It does not envy, it does not boast, it is not proud. It does not dishonor others, it is not self-seeking, it is not easily angered, it keeps no record of wrongs.Love does not delight in evil but rejoices with the truth. It always protects, always trusts, always hopes, always perseveres."
-Corinthians 13:4-8
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 »

SpiderX » Thu May 15, 2014 2:01 pm wrote:

Was wondering if it should be

Code: Select all

      if (CloseEnough(DailyStochMain, 0))
         if(CloseEnough(HT2StochMain, 100))
instead of

Code: Select all

      if (DailyStochMain == 0)
         if(HT2StochMain == 100)
Dont think it should be a big deal though.

Cheers
I see - misunderstood. Yes it should, and needs correcting. Bloody crapqlx.

: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 »

By the by coders, looking for an Experts crapqlx function, I came across a new one - ExpertsRemove(). Help suggests that this causes the ea to be deleted, although I haven't tested this yet.

: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
zader
Trader
Posts: 90
Joined: Fri Jul 06, 2012 8:46 am
Location: Rundown NW England

10.7 trading helpers by Steve and others

Post by zader »

SteveHopwood » Thu May 15, 2014 1:05 pm wrote: Thanks zader; you have been invaluable.
Invaluable? I was expecting pain in the arse nuisance but I'll take invaluable.
I'll shut up now with my Spectrum basic programming skills and let SpiderX check the code.
(yes Spectrum basic! google it kids)

Are these good enough to use on live account now??
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 »

zader » Thu May 15, 2014 4:28 pm wrote:
SteveHopwood » Thu May 15, 2014 1:05 pm wrote: Thanks zader; you have been invaluable.
Invaluable? I was expecting pain in the arse nuisance but I'll take invaluable.
I'll shut up now with my Spectrum basic programming skills and let SpiderX check the code.
(yes Spectrum basic! google it kids)
*stares dreamily off into the middle distance* Ahhhhhh, the ZX Spectrum............
Are these good enough to use on live account now??
I wouldn't; let's check them first. They appear to be working ok on my demo.

: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 »

Following the work of some invaluably helpful contributors, the latest versions of all 8 ea's are in post 1. I strongly recommend that anyone using any of them download the latest.

Still not sure if the single trade line confirmation time thingy is working properly or not. The code appears blindingly obvious to me and I cannot see anything wrong. There again, until zader stepped in, I couldn't see anything wrong anywhere yet the faults are blindingly obvious to anyone with a firing brain cell. Clearly, I do not belong to this august group.

So, thanks for your help guys. I was getting nowhere with all this.

Mind, the next messenger better have very good armour.

: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 »

Here are my test results so far on H1 charts:

For the buy or sell twice trend EAs, there is no waiting time to execute an entry, everything seems fine.

For the single entry trend EAs, the entry still has problem but I think I have figured it out . I used the default waiting time of 2 minutes before taking a trade. If the waiting time finished on the same bar, the trade would be entered correctly. If the waiting time was beyond the current bar, i.e., a new bar formed before the 2 minutes waiting time was up, the EA reset everything at the new bar opening. For example, if price broke stoch 10 one minute before bar close, when the new bar started, everything will be reset. Since at that time, the price has already passed Stoch 10, the EA would wait until price broke the Stoch 30 threshold.

I do not trade counter trend trade, so I haven't tested them but I believe the logic would be the same.
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 » Fri May 16, 2014 11:49 am wrote:Here are my test results so far on H1 charts:

For the buy or sell twice trend EAs, there is no waiting time to execute an entry, everything seems fine.

For the single entry trend EAs, the entry still has problem but I think I have figured it out . I used the default waiting time of 2 minutes before taking a trade. If the waiting time finished on the same bar, the trade would be entered correctly. If the waiting time was beyond the current bar, i.e., a new bar formed before the 2 minutes waiting time was up, the EA reset everything at the new bar opening. For example, if price broke stoch 10 one minute before bar close, when the new bar started, everything will be reset. Since at that time, the price has already passed Stoch 10, the EA would wait until price broke the Stoch 30 threshold.

I do not trade counter trend trade, so I haven't tested them but I believe the logic would be the same.
The EA's decide there is a trade to be taken, then go into a loop that examines the Sto7 for a retreat into an untradable area for however long you chose the waiting time to be. If Sto7 retreats at any point, the trade is cancelled. If not, the ea proceeds to attempt to take the trade on exit from the loop.

If the trade attempt fails, then the ea resumes normal activity. If conditions are still correct for a trade, it starts the cycle again. If not, there is no further attempt to trade.

The Sto7 can scream up and down like an elevator on acid. On the charts and if at the close of the candle, it is the same value as it was at the candle open, in retrospect it will look as though the thing has not moved for the entire 4 hours - yet it might have opened and closed several trades.

That is the downside of using 'confirmation' delays with an indi as sensitive as those being used here. We might not get what we assumed we would get from looking back in time. Bob says he trades when everything else is in place and Sto7 crosses appropriately. He does not await 'confirmation' stuff like 'remained above for x period of time' or 'wait for the candle to close' etc

You might be barking at the wrong moon with all this. Not saying you are, just suggesting you might be.

:xm:

: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
rdg281
Trader
Posts: 56
Joined: Mon Dec 09, 2013 10:39 pm
Location: Netherlands Limburg

10.7 trading helpers by Steve and others

Post by rdg281 »

Hi Guys :hi:

Is there also an ea (helper) available that only closes the long(s) at the upperband and short(s) at the lower band trade(s) of the true TMA And when it done that. the ea deactivate?
It must only close the longs when you want to, or only the shorts when you want to. (adjustable)(not both at the same time.
Or can somebody make that? That would be very nice and handy :smile:

thx for the answer and have a nice weekend.

Cheers :)

Roberto
The winner takes it all :arrrg:
kwchau
Trader
Posts: 305
Joined: Tue Jan 03, 2012 3:37 pm

10.7 trading helpers by Steve and others

Post by kwchau »

Based on Steve's Sell Twice into Trend EA, I have made some changes to the codes such that I can trigger trade based on W1 Stoch 7 and take profit when the D1 Stoch 7 reaches my threshold. There is no other exit strategies. I put the attached amended EA on a D1 chart. It runs ok all along but suddenly today, it keeped opening and closing trades until I removed it manually. :arrrg:

Here are the line that I've made changes:

103 extern int TradingTimeFrame=10080; I changed to 10080 to use W1 Stoch 7

110 extern int Stoch7ExitTF=1440;//added by kwc
111 extern int ExKPeriod=14; //added by kwc
112 extern int ExDPeriod=4; //added by kwc
113 extern int ExSlowing=3; //added by kwc
114 extern int Stoch7ForExitLevel=15; //kwc: close position when stoch 7 reaches this level

153 double DailyStochMainClose; // kwc: added for trade closure based on Daily Stoch 14 4 3 on a D1 chart

1073 to 1078
if (!EveryTickMode)
dStochMain[1]=GetStochastic(Symbol(),TradingTimeFrame,KPeriod,DPeriod,Slowing,Method,Price,MODE_MAIN,shift + 1);
else dStochMain[1]=GetStochastic(Symbol(),TradingTimeFrame,KPeriod,DPeriod,Slowing,Method,Price,MODE_MAIN,shift);
}//if (PrevOldStochBarsTime != iTime(NULL, TradingTimeFrame, 0) )

OldStochBarsTime = iTime(NULL, TradingTimeFrame, 0);
dStochMain[0]=GetStochastic(Symbol(),TradingTimeFrame,KPeriod,DPeriod,Slowing,Method,Price,MODE_MAIN,shift);


1083 DailyStochMainClose=GetStochastic(Symbol(),Stoch7ExitTF,ExKPeriod,ExDPeriod,ExSlowing,Method,Price,MODE_MAIN,shift);

1171 if (DailyStochMainClose <= Stoch7ForExitLevel) CloseThisTrade = true;

My coding skill is nearly zero so I could not figure out what has gone wrong.

I hope I've made myself clear enough so that Steve or some coding gurus in this forum could help me to find out where are the problems and how I could overcome this opening and closing issue. Thanks guys in advance ! :roll:
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Nanningbob 10.x”