| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| My shell EA code https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=79 |
Page 7 of 23 |
| Author: | SteveHopwood [ Sun Mar 18, 2012 11:01 am ] |
| Post subject: | Re: My shell EA code |
Latest update in post 1. Faults have come to light as I have used the shell, that I had to correct in the EA I was coding. I have then returned to the shell and reproduced the corrections. I have removed the OverallTrend variable from the trend-detection functions as I have never used it. |
|
| Author: | 4exbob [ Tue Mar 27, 2012 8:11 pm ] |
| Post subject: | Re: My shell EA code |
another waisted day, well not totally... was out and the sun was shining but started this morning some test (symphony and other on a crimmy) back at home, hmmm no trades yes, once again lot size to high or .... bang the head (i am also an I....) well some criminals are more equal then others. in this case mbtrading uk and the lotsize by mbtrading is 10.000, so 1 full mbtrading lot is really a mini maybe you can in another life, when coding allowed lotsizes take MarketInfo(Symbol() ,MODE_LOTSIZE) into consideration a little ps in the symphony ea, initially MaxLotsAllowed is also 0 (on the trading chart), because initially it is not calculated. It is only in a loop regarding open trades. |
|
| Author: | SteveHopwood [ Tue Mar 27, 2012 9:46 pm ] |
| Post subject: | Re: My shell EA code |
What the blue blazes are you wittering about and why are you wittering about it here? Don't answer. That was a rhetorical question intended to highlight that you are an idiot. Maybe you are so thick that the point of this thread has escaped you. Go back to post one and work out what that is. Do not waste my time again with moronic posts like your latest, or I will remove from you your ability to post at all. |
|
| Author: | 4exbob [ Wed Mar 28, 2012 6:54 pm ] |
| Post subject: | Re: My shell EA code |
thanks Steve, had no intention to derail this thread or take precious time from coders. just wanted to make you and other coders aware of what i encountered. noticed it with testing symphony, on a broker which has another dictionary c.q. defenition of what we trade when we set lot=1.0 at 'normal' brokers this would mean a full lot , cq a contract size of 100.000 units at mbtrading.co.uk lot=1.0 means a contract size of 10.000 units result is that maxlotcalculation (ARS) is lower then expected. (factor 10) as i see maxlotcalculation as part of moneymanagement, i presumed that would make part from the shell which forms the basis for the EA's coded. therefore i posted here. when you think it is not apropriate here, just move or delete. it is your board. can imagine you say , stay with 'normal' brokers. not in my lifetime i am going to change this (why i wrote maybe in another life) |
|
| Author: | SteveHopwood [ Mon Apr 23, 2012 6:23 am ] |
| Post subject: | Re: My shell EA code |
Latest update in post 1. A few bloops have emerged as I used the shell; these are fixed. I have added a 'bare bones' shell. |
|
| Author: | SteveHopwood [ Sun Apr 29, 2012 9:09 am ] |
| Post subject: | Re: My shell EA code |
Latest update to the full shell in post 1. Adding the Recovery module to an EA I am writing for faxxion, I noticed I had not included the code to adapt the Recovery pips inputs to x digit crims. All you need to do to correct this is go to int init() and add this to the adaptation block: Code: Select all |
|
| Author: | SteveHopwood [ Sun Jun 17, 2012 10:11 am ] |
| Post subject: | Re: My shell EA code |
The latest version of the bare-bones shell is in post 1. This has Lifesys' pips-conversion code. I have changed the names of the externs such as TakeProfit to TakeProfitTarget etc. These need to be doubles for pip conversion, so I have retained the old TakeProfit etc variables, turned them into doubles and set them to the value of their related externs at the start of int init(). Paul has also run his slide rule over the management features and corrected some bloops. These functions should be watertight now. I have added Slope to all this; I think Slope is going to feature in most trading systems from now on. I have not bothered updating the full version - I never use it. Much easier is to use the bare-bones version and copy across anything that is needed from the full version. |
|
| Author: | SteveHopwood [ Mon Jun 18, 2012 10:44 pm ] |
| Post subject: | Re: My shell EA code |
Latest update to my bare-bones shell code in post 1. I had added the external inputs for Slope, and the code to use these to generate a trend definition, but not actually added trend consideration to void LookForTradingOpportunities(). A teensy bit worrying that nobody else appeared to have noticed this humongous bloop. You guys do understand that I am not omnipotent, don't you? If in doubt, ask Gary, Matt. George, either of the Pauls, spotdespot, Philippe......... They will cheerfully confirm my utter unomnipotenceness. When using my code, always bear in mind my signature. |
|
| Author: | patman [ Thu Jun 28, 2012 1:46 pm ] |
| Post subject: | Re: My shell EA code |
Hi Steve, I was wondering... You use void PFactor() to calculate factor (10000, 1000, 100 depending on symbol) Then values are divided by factor in calculations. Point has value of 0.00001, 0.0001, 0.001 depending on symbol Why not multiply by 10*Point instead of dividing by factor? Or is Point different on 4 & 5 digit crims? What am I not getting? Pat |
|
| Author: | Lifesys [ Wed Jul 04, 2012 2:54 pm ] |
| Post subject: | Re: My shell EA code |
Hi Patman Most Empty4 programmers start from the wrong end of the number because it seems no-one expected the plethora of Digits or Points. Pips has a definition = 1 /100 UScent. This has little to do with the points/digits used for various pairs by various companies. Saw a company recently that used 2,3,4 or 5 Digits almost randomly!!! Pipfactor starts at the correct position - where the decimal point is, relative to a unit price! I may be new to MQ4 but started programming Fortran with punched cards over 40 years ago and amazed at so many dumb ideas to try and fix a simple problem because people start from the wrong end. Forget Points, Digits or multipliers, unless you are formatting output. Some simple solutions once PFactor routine is installed. 1. (Ask -Bid) * Pipfactor // always gives spread in pips, spread=MarketInfo("EURUSD",MODE_SPREAD); // gives arbitrary points NOT Pips. 2. PipsLong = (Close - Entry ) * Pipfactor; PipsShort = (Entry - Close ) * Pipfactor; 3. StopLossPrice = Entry - StopLossPips /Pipfactor; etc. This works ALL the time with any company, for different instruments or commodities just add a line to the routine. eg SP30 factor = 1.0; regards Paul |
|
| All times are UTC | Page 7 of 23 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|