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 1 of 38
Author:  SteveHopwood [ Thu Feb 14, 2013 10:09 pm ]
Post subject:  Useful 10.x thingies by Steve and Others

Here is where I shall place updated versions of anything I develop for 10.x. I shall also add links to anything that others produce and post in Bob's thread, so stuff does not get lost. Developers, feel free to contact me with a link if I miss something you produce. This thread can become a central repository of useful bits and pieces. Mods, treat this thread as if it were your own and update/add stuff at will.

10.x H4 Pending Order Placement Script
Use this when you spot a trade setup. Drag it onto the chart and the script will:
  • Calculate the pivots - I have pinched the code in Bob's zip file for this, so any changes there need to be made here.
  • Calculate the MA.
  • Calculate the trade direction - market > MA is a buy stop; < MA is a sell stop.
  • Send the MA as the stop loss with the trade.
  • Calculate which resistance (buy) or support(sell) level at which to place the pending trade.
    • MinimumPipsToNextSR tells the script to move outwards a pivot if the next one is too close. For example, if you drag the script to send a pending buy less than MinimumPipsToNextSR from the weekly pivot, it will instead send the trade at MR1
  • Allow you to select the same tp levels as are available in ITM.
Most of the inputs should be obvious. Of the remaining:
  • BufferPips: this is the number of pips above (for a buy) or below (for a sell) you wish you pending trade to be set away from the relevant pivot.
  • The moving average inputs allow you to configure the MA to accord with your manual experimentation.
10.x H1 Pending Order Placement Script
  • works as does the H4 version, apart from using the D1 pivots shown on the H1 chart.
  • extra inputs, taking a buy trade as an example:
    • TpUsesOneLevelAway: puts the tp at the next pivot above the pending price.
    • TpUsesTwoLevelsAway: puts the tp two pivots above the pending price.
    • SlUsesOneLevelAway and SlUsesTwoLevelsAway: go on, take a guess.
The scripts check the tf you have dragged them onto. If this is wrong, the script will alert you and not send a trade.

10.4 Individual Trade Manager
DO NOT USE ITM UNLESS YOU ARE TRADING 10.4 EXACTLY AS SPECIFIED. Muck around with the system and ITM will not work as you intend. It is not a mind reader.

Initial bugs are squished, so we can start to expand the features in the bot.

10.5 H1 CSS colour change order script.mq4
  • Use on a lower timeframe - Jem recommends the H1.
  • the script:
    • sends a buy trade when the market is above the MA and the CSS bars change from brown/goldenrod to green.
    • sends a sell trade when the market is below the MA and the CSS bars change from green/goldenrod to brown.
    • Control the trade direction manually by:
      • setting TradeLong and TradeShort to your desired combination.
      • setting MaPeriod to zero. If MaPeriod > 0, it controls the TradeLong/Short inputs.
    • closes a buy trade when CSS changes back to brown, then removes itself from the chart.
    • closes a sell trade when CSS changes back to green, then removes itself from the chart.
  • the script looks for a trade at the open of each new candle. Value and colour displays are the close two, then 1 candle ago.
  • the inputs should be straightforward to work out, apart from:
    • LoopPauseSeconds: a script is a run-once then remove thingy. The code needs to go into an endless loop to force a script to work as does an EA. This input tells the script how long to wait before looping around the code again. The default is 1 second.
  • You need 10.5 CurrencySlopeStrength1.0.7d for automation.mq4 in your indi folder. You do not need it on your chart - continue to use the version with the full list of inputs. The automation version has a lot of inputs removed to make calls to the indi easier.
  • remember you lose a script if you have to restart your platform.
I have added the Individual Trade Manager features to the script. Any inputs you are confused by are explained in the 10.4 Individual Trade Manager User Guide.pd

Jem's CSS trade manager.mq4
Jem emailed me last week to ask me to code a multi-pair EA that will close open trades when CSS on his chosen timeframe changes to the opposite colour i.e. close a buy when CSS turns red and a sell when it turns green.

Jem's CSS trade manager does this - at least it has in testing today. Requirements:
  • you need 10.5 CurrencySlopeStrength1.0.7d for automation.mq4 in your indi folder. You do not need it on your chart.
  • load the EA onto a single chart and it will look for CSS colour changes on all trades whose magic number match that of the EA's MagicNumber input. Time frame is irrelevant; this is controlled by the timeFrame input.
  • if you have the indi loaded onto any of your charts, make sure that the inputs of the indi and the EA match.
:D

Links to contributions by other members
Author:  xlitang [ Thu Feb 14, 2013 10:50 pm ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

Steve,

Just tested your script. It keeps open new pending orders until you remove the script from chart.
Author:  SteveHopwood [ Thu Feb 14, 2013 11:00 pm ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

xlitang wrote:Steve,

Just tested your script. It keeps open new pending orders until you remove the script from chart.
Ye Gods, of course it does. It is a script, dammit. It sends a pending trade to your crim. Once sent, how the hell do you imagine it is suddenly going to delete it?

Your user name is coloured a fetching light-red colour. This is intended to indicate to less experienced people here that you know what you are talking about. Yet you appear not to know what a script is.

If you are unsure what a script does, then go to BabyPips.com and find out. You appear to need to.

Sorry to sound irritated, but I am. I have been busy today with other thingies and yet still managed to produce this script. I am not pleased to find that a member here in whom I have invested some status, actually does not appear to know what a script is.

Get a grip, fella.
Author:  theforexedge [ Thu Feb 14, 2013 11:32 pm ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

Steve

Is it possible to make a indicator that sends a email to alert when the RSI is at 100 or 0?

Also a cross of the 240MA would be nice! :D

Even though i'm not a coder i did manage to mod the MACD Crossover Alert to send a message to my mobile using SendNotification() that works really well.

Thanks, JP
Author:  SteveHopwood [ Thu Feb 14, 2013 11:40 pm ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

theforexedge wrote:Steve

Is it possible to make a indicator that sends a email to alert when the RSI is at 100 or 0?

Also a cross of the 240MA would be nice! :D

Even though i'm not a coder i did manage to mod the MACD Crossover Alert to send a message to my mobile using SendNotification() that works really well.

Thanks, JP
Over to the indi coders for this one. I can code EA's and scripts - any old idiot can code these. Indi coders are strange, mysterious people who understand stuff like counted_bars=IndicatorCounted(); and ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeFrame);

My eyes glaze over when I read this stuff. You need the likes of NT, Lifesys, Baluda, fmuir, sq, gaheitman etc

Bear in mind that they all need therapy. :lol:

:D
Author:  xlitang [ Fri Feb 15, 2013 2:19 am ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

SteveHopwood wrote:
xlitang wrote:Steve,

Just tested your script. It keeps open new pending orders until you remove the script from chart.
Ye Gods, of course it does. It is a script, dammit. It sends a pending trade to your crim. Once sent, how the hell do you imagine it is suddenly going to delete it?

Your user name is coloured a fetching light-red colour. This is intended to indicate to less experienced people here that you know what you are talking about. Yet you appear not to know what a script is.

If you are unsure what a script does, then go to BabyPips.com and find out. You appear to need to.

Sorry to sound irritated, but I am. I have been busy today with other thingies and yet still managed to produce this script. I am not pleased to find that a member here in whom I have invested some status, actually does not appear to know what a script is.

Get a grip, fella.
Sorry for my ignorance. I accidently treat it as EA instead of script.
Author:  aristid [ Fri Feb 15, 2013 4:52 am ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

SteveHopwood wrote:Next step is over to you guys to answer this question: what do you want as a take profit? Let me know.
hello, thanks for all you're doing.

an EA that exits the positon when AO turns bad would be of great value.
the user can do everything manually, all you need to do is setup your positions when RSI is flat, but this would be of great help, leaving the pc on with just this running when actually in the trade.
I am imagining, for a long, first wait until the AO turns green after entry (order may have been placed when AO still red), then exit the position when red. Opposite for shorts.

thanks again!
Author:  Tabula Rasa [ Fri Feb 15, 2013 6:01 am ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

Something like the attached might work for a 240MA price alert.

Keep in mind that NB 10.4 uses a 240 LWMA rather than a simple MA.

Alternatively, http://www.forexfactory.com/showthread. ... ost4986060 might be worth a look.

theforexedge wrote:Steve

Is it possible to make a indicator that sends a email to alert when the RSI is at 100 or 0?

Also a cross of the 240MA would be nice! :D

Even though i'm not a coder i did manage to mod the MACD Crossover Alert to send a message to my mobile using SendNotification() that works really well.

Thanks, JP
Author:  Tabula Rasa [ Fri Feb 15, 2013 6:11 am ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

Also, attached is the dashboard I have been using.

Edit: Apologies - Wrong dashboard attached. Correct, working one now added.

theforexedge wrote:Steve

Is it possible to make a indicator that sends a email to alert when the RSI is at 100 or 0?

Also a cross of the 240MA would be nice! :D

Even though i'm not a coder i did manage to mod the MACD Crossover Alert to send a message to my mobile using SendNotification() that works really well.

Thanks, JP
Author:  forextrader-radioman [ Fri Feb 15, 2013 8:10 am ]
Post subject:  Re: Useful 10.4 thingies by Steve and Others

SteveHopwood wrote:[...] Next step is over to you guys to answer this question: what do you want as a take profit? Let me know.[...]
Steve, thank you :)

I prefer taking the profits at fib-extensions ... 38.2% for TP1 and 61.8% extension for TP2 ...

of the last swing in H4 chart (safer) or D1 chart (more risk)

all of you a nice weekend,
Dietmar
All times are UTC Page 1 of 38