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

Useful 10.x thingies by Steve and Others
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1492
Page 7 of 38
Author:  MurphyMan [ Wed Feb 20, 2013 4:03 pm ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

MurphyMan wrote: Shouldn't the SL be set at the BE point or is it already there and I'm missing it? And shouldn't that BE point move as subsequent trades are added? Perhaps that BE/SL could be given as an optional input for InsertMissingStopLoss. In the old Beast series you had a blue BE line.
Okay - I found MoveStopToBeakeven, and was set to True (not in the users guide).

I have two EURCAD longs open. Started with the SL set to 0 for both trades. I dragged ITM onto the chart and let 'er rip. Instead of setting a single BE point (between the two trades) SL for both trades, it set one at the current 240, and another at the WMP, which also happened to be the same as the first trade.
Author:  SteveHopwood [ Wed Feb 20, 2013 7:17 pm ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

MurphyMan wrote:
MurphyMan wrote: Shouldn't the SL be set at the BE point or is it already there and I'm missing it? And shouldn't that BE point move as subsequent trades are added? Perhaps that BE/SL could be given as an optional input for InsertMissingStopLoss. In the old Beast series you had a blue BE line.
Okay - I found MoveStopToBeakeven, and was set to True (not in the users guide).

I have two EURCAD longs open. Started with the SL set to 0 for both trades. I dragged ITM onto the chart and let 'er rip. Instead of setting a single BE point (between the two trades) SL for both trades, it set one at the current 240, and another at the WMP, which also happened to be the same as the first trade.
I have been going to reply to your first one all day Sam - been busy.

My understanding is that when a subsequent trade n opens, then trade n-1 has its stop moved to breakeven.

Is this one of my many misunderstandings?

:D
Author:  Gertje [ Wed Feb 20, 2013 7:51 pm ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

SteveHopwood wrote: I have been going to reply to your first one all day Sam - been busy.

My understanding is that when a subsequent trade n opens, then trade n-1 has its stop moved to breakeven.

Is this one of my many misunderstandings?

:D
My understanding is that the 'basket' of the pair is set to BE, having the SL put in the middel of the two trades. For à thirth trade, SL is changed accordingly.
Author:  SteveHopwood [ Thu Feb 21, 2013 10:43 am ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

I asked Bob about the breakeven thingy and I have misunderstood, so thanks Sam and Gertge for bringing this up. Bob's reply:
The two of them together would place a BE level. So if one is at +100 and the second one enters and is at 0 BE would be +50 and -50. A third trade would cause the BE move up so all three would become BE if hit. No risk trading.
I shall amend this in time for trading next week, with blue line etc.

We also need a pending trade deletion day and hour - not much point in leaving pendings in place that are based on the wrong pivots.

Also, it would be nice to have an automated expiry time set into the script. Any coders out there with any idea how to do this?

:D
Author:  spotdespot [ Thu Feb 21, 2013 11:10 am ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

SteveHopwood wrote:
Also, it would be nice to have an automated expiry time set into the script. Any coders out there with any idea how to do this?

:D
Disclaimer.....ex-coder 8-)

If you want the pending orders to expire at the end of the week - can't you just work out the time remaining on the weekly bar and use that as the expiration time in the "ordersend" function?

e.g. using something like:

Code: Select all

expiration=iTime(NULL,PERIOD_W1,0)+10080*60-TimeCurrent()
Cheers,
Dave.
Author:  SteveHopwood [ Thu Feb 21, 2013 11:21 am ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

spotdespot wrote:
SteveHopwood wrote:
Also, it would be nice to have an automated expiry time set into the script. Any coders out there with any idea how to do this?

:D
Disclaimer.....ex-coder 8-)

If you want the pending orders to expire at the end of the week - can't you just work out the time remaining on the weekly bar and use that as the expiration time in the "ordersend" function?

e.g. using something like:

Code: Select all

expiration=iTime(NULL,PERIOD_W1,0)+10080*60-TimeCurrent()
Cheers,
Dave.
Taa. I will give it a try.

:D
Author:  MurphyMan [ Thu Feb 21, 2013 2:18 pm ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

SteveHopwood wrote:I asked Bob about the breakeven thingy and I have misunderstood, so thanks Sam and Gertge for bringing this up.

:D
Hey, I got one right! :lol:

As far as the time expiry, for me that would be a low priority. As you always say, there is no such thing as a set and forget EA and I think I am better off reviewing the pendings on some kind of regular basis and making the decision to keep them or delete.

JMVHO
Author:  zimezoom [ Thu Feb 21, 2013 4:52 pm ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

Hello!

Excellent job with 10.4! Really appreciated!
One question: how do I read the value of the "embedded" RSI(2) from EA code?

Thanks!
Author:  SteveHopwood [ Thu Feb 21, 2013 5:59 pm ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

ITM V 1c is in post 1.

From the updated user guide:
Breakeven inputs
If you have been trading 10.4 properly, then by the time a second trade opens, the first will be a long way into profit. This means you can set a stop loss on both trades that will result in breakeven or better, should the market retrace.
  • ExtraBreakevenProfitPips: this allows you to add extra pips to the breakeven price. The default of 10 means we come out with 10 pips profit should the basket close at BE.
  • BreakevenLineColour: by default, IMT draws a blue BE line on your chart, and closes the trades should the market touch/cross it. This input allows you to use your own favourite colour.
:D
Author:  mjws00 [ Thu Feb 21, 2013 7:22 pm ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

zimezoom wrote:Hello!

Excellent job with 10.4! Really appreciated!
One question: how do I read the value of the "embedded" RSI(2) from EA code?

Thanks!
I hope this question gets tackled as well. It is a tricky little bit of indicator code.

My guess is it will involve slamming tmaslope into an array, then reading iRSIArray() on it, then we can finally worry about logic to handle the values. The stoch equiv isn't nearly as nice as there are many weak signals that don't get filtered. Especially for an EA or "helper" type system.

I'm hoping the clever indi guys get it nailed before I get it done myself. But it is so so so pretty as an alert and signal it is way up on my list. Maybe we'll get it on one of the wizards radar. Preferably native and not full of icustom slowness. Heaven help ya'll if you're waitin on me.

Pretty please? Sugar, Cherries? A small donation? Bottle of Wine. Pick your poison ;)

Mike
All times are UTC Page 7 of 38