stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Wapen, an EMA, PSAR, Stoch EA
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=409
Page 3 of 5
Author:  SteveHopwood [ Wed Aug 22, 2012 9:52 am ]
Post subject:  Re: Wapen, an EMA, PSAR, Stoch EA

Having just read your pm and dragged a Stoch onto a chart, I think I see what you mean. Just make yourself crystal clear and I will add the function.

:D
Author:  winsteadglenn [ Wed Aug 22, 2012 2:07 pm ]
Post subject:  Re: Wapen, an EMA, PSAR, Stoch EA

Thanks, Steve. Here is a picture showing entry and stoch-exit.
Author:  SteveHopwood [ Wed Aug 22, 2012 4:23 pm ]
Post subject:  Re: Wapen, an EMA, PSAR, Stoch EA

winsteadglenn wrote:Thanks, Steve. Here is a picture showing entry and stoch-exit.
V 1a is in post 1.

I have coded closing a buy if Stochastic Main is < Stochastic Signal, and vice versa for sells. Turn this off by setting CloseOnStochCross to false.

:D
Author:  winsteadglenn [ Wed Aug 22, 2012 11:59 pm ]
Post subject:  Re: Wapen, an EMA, PSAR, Stoch EA

:mrgreen: :D :mrgreen: :D :mrgreen: :D
Author:  SteveHopwood [ Thu Aug 23, 2012 12:10 am ]
Post subject:  Re: Wapen, an EMA, PSAR, Stoch EA

I meant to add to my previous, 'so tell me if this is the wrong way around. It takes seconds to amend the code' but didn't.

So, sing out etc. You know the next bit.

:D
Author:  winsteadglenn [ Thu Aug 23, 2012 4:25 pm ]
Post subject:  Re: Wapen, an EMA, PSAR, Stoch EA

Singing. Might need it. I am trying to discover why it is not closing when expected. Usually it is something I am doing wrong.
Author:  SteveHopwood [ Thu Aug 23, 2012 5:11 pm ]
Post subject:  Re: Wapen, an EMA, PSAR, Stoch EA

Did you remember to enable CloseOnStochCross?

:D
Author:  winsteadglenn [ Thu Aug 23, 2012 8:23 pm ]
Post subject:  Re: Wapen, an EMA, PSAR, Stoch EA

Yes. That one I got done O.K. I should let it run another day to let it clear out some cobwebs, before changes, of course.
Author:  SteveHopwood [ Thu Aug 23, 2012 8:39 pm ]
Post subject:  Re: Wapen, an EMA, PSAR, Stoch EA

winsteadglenn wrote:Yes. That one I got done O.K. I should let it run another day to let it clear out some cobwebs, before changes, of course.
V 1b is in post 1. Your latest pointed me in the right direction.

All my bots are coded from my shell. The shell has evolved over time, as I have encountered/been shown and fixed bloops. Older bots contain the older bloops, so a change I make can be negated by an older bloop. This is the case with this bot; the non-hard trade closure function was only called if HiddenPips > 0. Later ea's have overcome this as I fixed it in the shell.

See if the latest works ok. Go birdy again if not.

:D
Author:  winsteadglenn [ Fri Aug 24, 2012 2:18 am ]
Post subject:  Re: Wapen, an EMA, PSAR, Stoch EA

Thanks, Steve. The 1b bot is rapidly opening and closing new trades. I think the opening requires that only the main stoch line be above or below horizontal level X, but closure of a trade requires that the relative position of the main and signal stoch lines be above or below each other. When both the main and signal stoch lines are in a given field, seeing that the main stoch line is consistent with opening a trade, it might trigger a trade and then realize that the relative position of the stoch main and signal lines dictates a closure. Presumably coding an opening trade might require that the relative position of the two stoch lines be in non-closure mode, even if the main stoch line is correctly above or below horizontal level X for opening a trade.. What do you think?
All times are UTC Page 3 of 5