Coders, post your most ludicrous coding requests

Post Reply
User avatar
SteveHopwood
Owner
Posts: 9751
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Coders, post your most ludicrous coding requests

Post by SteveHopwood »

Hey guys, I thought you might like a laugh. What follows is a request that I code an ea for a member.

Take your time reading it. First time around I only cottoned onto the ludicrous number of indicators listed in the second part. I missed the lunacy of the first part. I have since read it again and love it.

Hang on in there after losing the will to live after reading the first four lines. It is worth it, I promise.

Have fun at the dimwits' expense.

:xm:

"The 0ne EA

The name of the EA will be named "The One"
The EA will have notification functions and the ability to open trades and manage trade as per the users criteria.
The key features will be currency pair notification. This will enable it to be place on multiple pairs and give an individual identification on which pair the alert condition has been met.
Example: If one of several condition has be met on the GBPUSD, the EA should audibly say " "Condition 1 has be met on GBPUSD" this will be a pre-recorded sound bite to be used for that pair when one of several condition have been met. This will entail the EA having a separate sound bite alert for each pair the user wishes to monitor OR trade. This may be up to 15 pairs to begin with.
There are currently up to 4 conditions that the user can select for a trade to be place or notify the user that all condition have been met on the pair being monitored. However I would like the EA to have the option to select 1, 2, 3 or 4 conditions as per the users criteria to notify or trade.
The user can also select from the list of indicators in whichever sequence as a condition.
Example: Condition 1 can be cross of gann hilo on 1hr or other TF. Or user can select cross of 21 MA as condition 1, or any one of the other indicators from the list of indicators as condition 1.
Condition 2 can be break of 1 hour bar or cross 90/-90 or 0 on CCI for the 2 condition to be met. The user can choose any indicator from the indicator list and parameters for each condition
Condition 3 and 4 would select the condition form the indicator list as per condition 1 and 2.
Once the final condition are met as per the users criteria the EA would open the trade or notify the user that all conditions have been met open trade when ready.
NOTE: The user can select from 1 to 4 condition to be met for their entry rule. There does not have to be 4 condition met to open or notify a trade, it can be 1, 2, 3 or 4 conditions as per the users criteria.
TRADE MANAGEMENT
The user can use the EA to trade or notify user as and when conditions are met that leads to the final condition to open a trade or just notify user.
If the EA has been selected to open the trade then the user can select from a number of trade management options.
1) Open trade with single or multiple lots /micro lots. or trade percentage of account size.
2) Once trade is open the EA can perform moving stop to break even after pip value reached.
3) closing part of trade at profit target one and move part or all of trade to break even or number of pips in profit.
4) Leave part of trade at initial stop level.
Example : All conditions have been met and EA opens trade with 3 lots/micro
Trade moves 20 pips, Ea closes 1 lot at 20 pip profit target 1 and moves 2nd lot to break even and leaves 3rd lot at original stoploss level which may be number of pips from the open of the trade. say 20 pips in this example.
The EA will exit the other two lots/micro when profit target has been reached or when indicator condition indicates action to exit trade.
Example: exit rule may be set at multiple profit target or when indicator such as the CCI crosses users criteria level 90/-90 or 0.
Exit rules can use indicator in indicator list to exit trade.
If multi lot trade is entered the EA should allow for multiple exit option as per the users criteria whether indicator or profit target level.
Example: if 3 lots/micro is entered and the user wishes to use 3 profit target or exit option then the user should had this option.
Here in the following would be a concise example as to how the EA would work.
The user sets 3 conditions to open a trade. The EA would also notify the user as each condition is met.
Condition 1: notify when Gann hilo cross down on 1 hour time frame on GBPUSD
EA Alert Audible: GBPUSD condition 1 has been met
Condition 2: notify when 5 min upper TMA channel line has been touch.
EA Alert Audible: GBPUSD condition 2 has be met
Condition 3: notify when 5 min CCI cross down below 90 level
EA Alert Audible: GBP condition 3 has been met trade now opening. or NOTIFY:( open trade when ready.)
EA Trade management
EA has just open trade with 3 micro lots
The EA will set stoploss at selected pip value of 20 pips in this example for all 3 lots.
Take profit on this trade will be profit target 1 for first lot is 20 pips. Once this has been met then the EA will move lot 2 to Break even and leave lot 3 at the original stoploss.
Profit target for lot 2 is 50 pips. When this has been hit the EA close lot 2 and move lot 3 at break even. or number of pips in profit as selected.
Profit target number 3 can be closed when CCI cross above -90.
This is how the ea should work.
The user should have the flexibility to enter upto 3 take profit levels and an use any indicator and time frame to exit each portion of the trade. User can use same criteria to exit all 3 portions of the trade.
The EA should have the option of notifying the user when the trade condition has been met.

That concludes The One EA instructions.

Please see the list of indicators that will be in The One EA.
1) Moving Average (User to select MA period settings and time frame)
2) synergy volitilty pro (This indicator will change color when momentum increase, notify when colour change or when cross above 0 line)
3) Bar/Candle Break (notify when bar or candle breaks below precious bar or candle. his can be refined to break of body of previous bar / candle.
4) fast tma line (Notify when channel lines are touched. Upper line for short trade and bottom line for long trade.
5) adx (notify when lines cross
6) adaptive Gann High activator (notfiy when arrow above price or below price)
7) TRUE TL ( notify when price cross trendline)
8) SYNERGY TDI (Notify when arrow appear which signals crossing of lines or hooking up or down)
9) CCI (Notify when CCI cross selected levels 100, 90, 0 -100, -90
10) Heiken Ashi ( notify colour trend on selected time frame)
EXAMPLE of TRADE CONDITIONS
1) xPS VS GANN H4 TREND arrow down (price below 4hr gann trend down
2) Heiken Ashi H1 colour red for down
3) 5 MIN EXTREME TMA PULL BACK and touch upper channel line
4) CCI cross 100 TO OPEN TRADE
If possible add news filter and notification allow trading during news, do not open trade No: mins before and after news.
News filter should notify of high impact news on the currency which is affected.

THE END"
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. [email protected] 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.
jlcgarcia

The most ludicrous pm I ever received

Post by jlcgarcia »

Hi Steve,

take a look also at this request in the Blessing forum:
Hello
we are searching for a programmer for these functions for blessing

These function allready works in blessing pro:

Stop Loss and Trailing Stops
Each basket can have a stop loss and/or a trailing stop.
To use the Stop Loss you must set SLPips to a positive value. If it is set to 0 then the stop loss function will not be used. The stop loss will be fixed at the set number of pips from the basket break even point, and will be shown on the overlay as a gold dotted line if you have dLines set to true.
To use the Trailing Stop you must set TSLPips to either a positive or a negative value. If it is set to 0 then the trailing stop function will not be used. The trailing stop line will be shown on the overlay as a gold dashed line if you have dLines set to true. If a positive value is entered for TSLPips, then the trailing stop will fixed at the set number of pips from the start point, and will trail the price at that fixed distance. If a negative value is entered, then it will be treated as a positive value, and will work exactly the same as the normal trailing stop except that the pip value of the trailing stop will reduce as the price moves further from the start point. This means that as the basket makes more profit the trailing stop reduces to lock in more of that profit. The value of the trailing stop will not reduce lower than the value set in TSLPipsMin (which should be entered as a positive value). The reduction of the trailing stop uses a cosine function, which means that it will start reducing slowly at first, then speeds up as the price moves, and will slow down again it reaches TSLPipsMin. The distance over which the trailing stop reduces from TSLPips to TSLPipsMin is set using TSLMaxMinDist.
You can select the point at which the trailing stop will start through the TSLStartAt parameter, which accepts the following values:
0 (BE) to start trailing when the PA reaches the Break Even (BE) point. This setting may cause the basket to close at a loss because the trailing stop will start TSLPips before the BE point is reached.
1 (BE+) to start trailing when the trailing stop at the BE point. This method will start trailing when the PA is TSLPips past the BE point, and will normally ensure that the basket closes at a profit.
2 (TP) to start trailing when the PA reaches the Take Profit (TP) point. This method will start the trailing stop at TLSPips before the TakeProfit point, and will normally produce a profit as long as TSLPips is smaller than the expected TP.
3 (TP+) to start trailing when the trailing stop is at the TP point. This method will start trailing when the PA is TSLPips past the TP point.
4 to 100 which will be treated as a percentage, and the trailing stop will start when the price reaches the set percentage of the projected profit. This method may cause the basket to close at a loss if the set TSLPips value is greater than the calculated percentage of the projected profit.
For all settings of TSLStartAt other than 0 you can force the TSL point to be on the correct side of BE by setting TSLProtectBEPips to a value greater than 0. Do not set the value too high because if it is greater than the actual TP then this function will be ignored. A value of 1 or 2 pips will usually do a good job, and a setting of 0 will close at or just below BE, which may result in a small loss. Use a setting of -1 to turn this feature off.

2 (TP) to start trailing when the PA reaches the Take Profit (TP) point. This method will start the trailing stop at TLSPips before the TakeProfit point, and will normally produce a profit as long as TSLPips is smaller than the expected TP.

----

Indicator crossing MA

if a long and a short MA crosses it starts with the first position.

here we need to change the:
periode /
timeframe /
type of MA /
shuffle

Please tell me what you charge for this and how to play.
I wish you and Chris, and all the members of the forum a Good New Year

Regards


José Luis
User avatar
SteveHopwood
Owner
Posts: 9751
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Coders, post your most ludicrous coding requests

Post by SteveHopwood »

I have changed the title of this thread - should be good for a few giggles.

: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. [email protected] 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
simplex
Trader
Posts: 124
Joined: Thu Feb 07, 2013 5:21 pm
Location: An insignificant village close to an insignificant former capital at the Rhine River.

Coders, post your most ludicrous coding requests

Post by simplex »

SteveHopwood » 31 Dec 2014, 03:04 wrote:The 0ne EA
...
THE END
:clap:
After more than 25 years in the IT business I have seen many ridiculous functional specification papers, but The One EA would definitely be ranked under Top 5!

Thanks for sharing!
If you can't explain it simply, you don't understand it well enough. (Albert Einstein)
It appears that the Weighted Moving Average was invented by a trader who did not have a firm grasp of filter theory in hopes of reducing lag. (John F. Ehlers)
User avatar
SteveHopwood
Owner
Posts: 9751
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Coders, post your most ludicrous coding requests

Post by SteveHopwood »

Ok, so not a ludicrous coding request, but one of the dafter pm's I have received in quite a long time. Enjoy.
Hi Steve,
I have a trading strategy i want to share with the forum on HGB.
1. Set up three different profiles
a. Signal profile: Here you set up all trading pairs with HBG, stop trading-true;
You also add HGIMATRIX to this profile, save the profile as HGB_SIGNAL.
b. Live profile: All trading pairs with HGB, stop trading-false; from this profile
you set up your default template by saving one of the live charts as "default".
save profile as HGB_LIVE.
c. Profit profile: All trading pairs with HGB, stop trading-true; you add
HGB_BASKET_TRADE_MANAGER, set cash profit to 1usd.
save profile as HGB_PROFIT.

Now, i use 1Hr chart for this strategy because 60ma on the 4hr chart is 240ma
on the 1hr chart, so the trend signals on the 1hr charts are the pullbacks on the 4hr chart, and the trend signals are also in line with the weekly 2ma,perfect!!!

OK! at the start of the week trading, open HGB_SIGNAL, hunt for Trend signals only,once you catch a trend signal on any pair, study the conditions around that pair,if it meets your requirement, simply open the chart of that pair from the market watch and the default template will kick in,(pls note that i set instant trade and pending to true for TREND). Keep hunting until you get as many Trend Trades as possible for that day.

The other option is,open HGB_SIGNAL, if you find 5 or more trend signals that meet your requirements, open HGI_LIVE to start trading..

I prefer the first instance because you take the trades one at a time and the drawdown is quite low and profits higher.

Keep monitoring your trades and if you want to close your trades and take your profits for a given period that is okay for you, open HGB_PROFIT.

Repeat the cycle again and again and again.

Steve i want to thank you and your wonderful team for HGB and HGI.

You can add your own ideas to the strategy and share it with the forum.

Thanks. :xm: :xm: :xm: :!!: :!!: :!!: :clap: :!!: :!!: :!!:
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. [email protected] 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: 9751
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Coders, post your most ludicrous coding requests

Post by SteveHopwood »

Not the worst, but getting there:
Its a Fibonacci based range trading system.

Rules Daily Fibonacci:
Daily close above previous upper 23.6% ==> buy ==> close on next Daily upper 23.6%
Daily close above previous upper 38.2% ==> buy ==> close on next Daily upper 38.2%
Daily close above previous upper 50% ==> buy ==> close on next Daily upper 50%
Daily close above previous upper 61.8% ==> buy ==> close on next Daily upper 61.8%
Daily close above previous upper 76.4% ==> Do nothing

If close not done first day, move close level to next days Fibonacci % and so on until closed. (this can end up with a overall loss, but hopefully my filters will stop that from happening)

Sell trades are the same but the lower Fibonacci %

Stacking:
The trades use stacking with 5 pips+spread in between, the stacking is ABOVE and BELOW the first trade made. Alternative is to have 10 day ADR/10 as pips between trades, just to not overtrade. (should be an extern option to change this)

Have done this with pending orders manually, but have to open many Stop and Limit orders to manage big trends. Wouldnt recommend this for the ea.
Would like an extern option to set Max distance from original trade to open stacking trades too.

Max Trade Stacks:
Max 2 stacking pairs at the same time (extern option to change this) 1 pair can have both sell and buy but this should be concidered as 2 pairs then.

Filters for First Trade Only:
Price must be 10 day ADR distance from 20 day High and Low. (extern option to change days in ADR and number of days for High and Low)
Last day distance between High and Low must be lower than 10 day ADR.(extern option for days in ADR)
Daily close above/below 100% Fibonacci the last 2 days ==> No trade. (extern option for days)
Second pair to trade must be lower than 80% correlating from the first pair that is open. (extern option to change the correlation level)
Pairs to have advantage for trading is the pairs with the lowest volatility. Lowest 10/20 day ADR first, if no trading condition met, move on to the pair next in line and so on.


If you think I have missed some filters, please add them as an option for me to test.
Have traded this manually with some pairs, only problem is that I make the first trade only by looking at the charts. I will not trade if price is near the lowest or highest off the month, If the price is falling I do not take any buy trades and vice verse. If a pair is going up and down in the middle of monthly high/low its ok to take both buy and sell. Only look at H4 and D1 charts, but trade on H1. The Fibonacci signal is daily.
I make some manual intervention during news and other big events so the system isnt completly programable. I think atleast, maybe you have some ideas for this.

Hope you take on the assignment and code this for me.
"If you think I have missed some filters," Carumba. Let's add a handful of moving averages, RSI, VOLUMES. AllAVererages with every possible thingy enabled. Forgot Stoch and CCI. Oh, and let's bung in a handful of Crap Custom Abortions I found on the net over the last decade.

:arrrg: :arrrg: :arrrg:
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. [email protected] 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 “Lounge”