Forex Zone - Forex Forum

NEW EA Coding needed

Discussion started on New EA Coding

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
Please see the chart zoom to it's max for that specific period.
I had to redraw the whole chart, that's why there is a slight difference in the red line position on #3, but it is still very much in line with the previous image.
Here you will clearly see a down close from "a" to "b" , (the orange line is just in the next hour trade now, but the signal will remain the same. 
"Then you said the next candle closed below the line. I do not see this. I see the next candle's black line clearly above the red line. So we have a black line that was below the red line and then it went above the red line the next candle. It seems the only new piece of information here that was not stated before is the direction of the black line. So it cannot simply cross as you said before, but the actual slope of the black line needs checked too."
The black line is merely a line connecting the dots, the dots are the crucial elements.
#5, I've cut the attached image to the market to what you would actually see at that time in the market, anything from this still have to happen, so there will be no blue line next to #5, the market is still going up, (as we can see in hindsight).  
A new color line only starts developing once the dot touches the current color. On every hour close, the red line will move down by a determined calculation, So if the market goes up, and touches or closes below the orange line, (keep in mind, during that hour, the market goes up and down  through the line, only at the close of the hour, will the dot be fixed) a blue line will start to develop from a determined position below the market in an upward direction. The angle is determined by the market moves.
So the blue line you see in the other images next to #5, will only start drawing at the point where I cropped the image, after the market closed through the orange line.
#16 - July 27, 2018, 03:17:09 PM
Attachments:

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
Grid line names and colors
#17 - July 27, 2018, 08:54:00 PM
Attachments:

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
I analyzed the grid very closely and tried to write the code for the indicators, but in all honesty, I am surprised I even got the attached mql to work like it's supposed to.
If we can get this grid right, and combine it with your MA RSI arrows, and another EA with this grid and MA CCI arrows.
Let me 1st explain how the IN1 calculates it's levels to the best of my ability:
Grid lines are as follows:
1. Vertical grid = 4 bars of TF, let's call this VG 
2. Horizontal grid = High close (HC) - Low close (LC) of the last 30 vertical grids, (so it's basically the last 120 bars) divided by 9. Lets call this HG, 

(The problem I have with this is the indicator doesn't adjust the high and low lines, so the orange and blue lines become quite vertical after about 1 week on the M15, I managed to, with the help of an online coding app, to write code for a more acceptable, and workable mq4 that adjusts according to custom inputs, please find it attached. This will paint the high and low of the last 120 (or 240, or whatever input the user inserts) bars. A more accurate signal will be on the highest close and the lowest close  and not high and low, of the last x amount of bars)  HC-LC

So HG is ( HC-LC ) /9 (The 10 different horizontal lines)
EG: (1.32005 - 1.30805) / 9 = -0.00133, so each horizontal line be at 0.00133 points higher from the bottom. Let's call this the HGD (Horizontal grid difference)

3. Diagonal grid is easy, a diagonal between VG and HG meet, DG , DGD=Diagonal Grid Difference

The indicator price line is calculated at an amount of lower ticks and higher ticks and as you can see is basically a line chart, with dots on the close, we can just use the standard TF closing price (CP) as it is close enough, and actually produces clearer signals on the H1.

The painting of the orange and blue lines are as follows:

To start the 1st line, Up close, it will start with a blue line, down close, start with orange. 
Orange Line OL:
Line value = CP + HGD. (CP 1.31205 + HGD 0.00133 = 1.3133) 
Now the line will paint parallel to the downward diagonal line on every close and will keep the slope of the diagonal grid line UNLESS the close is lower, then it will draw at the lower close + HGD. If the close is higher, it will continue on the parallel to DG. So it will still draw lower, except the lower draw will be at previous OL value + HGD and not close + HGD, the orange line will never go up. It keeps a HGD minimum downward slope, only time slope will change is on lower close, then it uses CP + HGD. (You can gather from this that the horizontal grid actually has, in this case 133 points, (sounds like a lot, but it's only 13,3 pips) between the horizontal line visible on the chart.)
When CP>OL (Market closes above orange line) then a blue line will start from the lower upward diagonal grid below the crossing, in the same relation to the cross' upward diagonal line, (if the CP is 3 points above the upward diagonal line on the close, the blue line will start 3 points above the lower upward diagonal line) blue line the draws at the same calculation as orange ,and orange doesn't draw anymore obviously except higher close will be CP-HGD, lower close will be previous BL value-HGD.
And so the process repeats itself, when CP<BL and orange line will begin and blue will stop drawing.
I will try to make a video of this all happening if you want, but it can only be of the blue and orange line painting.
 

 
#18 - July 29, 2018, 01:30:42 AM
Attachments:

Administrator
  • Hero Member
  • Posts: 5114
  • Points: 29361
  • Likes Received: 5122
  • Reputation: +220/-14
This is a lot to consider. The information about the grids now is all new and adds to the complexity. I will need some time to review and reply to all this.
#19 - July 30, 2018, 02:16:37 PM

NEW EA Coding needed in New EA Coding_topic=585

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
This is exactly why this system needs to be traded by an EA.
Look at the buy signal in GBP when I was not close to the PC, in the meanwhile one can catch the M5 buy moves manually as described earlier.
Fortunately I was in time for the attached USDCAD signal.

The most important grid is the diagonal, as described earlier, the indicator paints the line on the DG, except when the close is more than the DG value, then it paints at the close +/- the DG value 
 
#20 - July 30, 2018, 03:08:56 PM
Attachments:

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
Hi all.
After no success from the company where I bought the original EA from, I feel I can post the indicator, (referred to as IN1 in my previous posts)
I bought the EA, but the EA itself is no good, then I started watching it closely, and this is how I got to the trading strategy as posted here.
To make things easier, I decided to post the Indicator file. (I just renamed it, for obvious reasons) 
I feel because I paid for it, I can modify it, besides, it is only the indicator, and not the EA which I am sharing. (The EA is no good anyway :-\)
Hope this helps in coding the new EA.
If not, here is a good manual trading strategy then for who-ever wants to use it.
#21 - August 02, 2018, 11:06:13 PM
Attachments:

  • Sr. Member
  • Posts: 352
  • Points: 71
  • Likes Received: 150
  • Reputation: +11/-0
For those who are interested, I am nearly done in writing this EA.
I am not at the coding level of Admin or CrazyProg, I am using a wysiwyg EA builder and my limited knowledge of MQL, but I am getting it done.
If there is any interest, please let me know.
#22 - October 18, 2018, 07:34:37 PM

Members:

0 Members and 2 Guests are viewing this topic.