• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 2:37am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 2:37am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

Free Coding request for EA breakdown level / trend line 0 replies

Free Coding: your systems 24 replies

Free Coding Request 2 replies

I Will Learn Coding in 1 Month - Give me the 80/20 of MT4 Coding 14 replies

Free Coding Request 0 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 416
Attachments: Free Coding request
Exit Attachments
Tags: Free Coding request
Cancel

Free Coding request

  • Last Post
  •  
  • 1 45Page 678 32
  • 1 5Page 67 32
  •  
  • Post #101
  • Quote
  • Sep 12, 2016 8:18am Sep 12, 2016 8:18am
  •  Gorraf
  • Joined Aug 2016 | Status: Member | 125 Posts
Quoting igorgontijo
Disliked
{quote} Gorraf thank you very much for your help! The script is not calculating the lot size corectly yet. When the total amout of capital is low, like 15 dolars, and I set the risk to 5% the script doesn't open the operation. And when it gets higher than 48.18 lots he doesnt operate too. Here is the code: Lots=((AccountBalance()/100)*RiskPercent)/(MarketInfo(Symbol(),MODE_MINLOT)*MarketInfo(Symbol(),MODE_LOTSIZE)); Can you help me?
Ignored
Sorry, my bad.

Use this line instead:
Inserted Code
Lots=MathFloor(((AccountEquity()/100)*RiskPercent)/(MarketInfo(Symbol(),MODE_MARGINREQUIRED)*MarketInfo(Symbol(),MODE_MINLOT)))*MarketInfo(Symbol(),MODE_MINLOT);
 
 
  • Post #102
  • Quote
  • Sep 12, 2016 9:10am Sep 12, 2016 9:10am
  •  Gorraf
  • Joined Aug 2016 | Status: Member | 125 Posts
Quoting simnz
Disliked
{quote} Hi Gorraf, The export function is working when the market is open. Please add other inputs as and when it is convenient for you. Thank you.
Ignored
Hello simnz!

I am a bit puzzled about where, and how do you want to see this:
Quote
Disliked
Is it possible to classify number of pip thresholds Hour - wise? If number of pips thresholds has happened 10 times . How many of them have happened in first hour,
or second hour or third hour etc. of a day? It should be linked with start hour and ending hours only.

Should it write out an additional table or should it only appear in the export?

It's way too monday. Could you point me to the direction, where you detailed the other inputs?

Additionally, the results will show only in the grey (daily timeframe) boxes now. If there isn't any grey box, all the results will appear.
Attached File(s)
File Type: ex4 ProblemSolving_simnz_SpeedCandles_ind.ex4   61 KB | 137 downloads
 
 
  • Post #103
  • Quote
  • Edited 10:26am Sep 12, 2016 10:03am | Edited 10:26am
  •  Hmsr
  • | Joined May 2016 | Status: Member | 322 Posts
Hello Gorraf,

I sort of have the same problem with you I know what I want,
example below with x axis Hour of the day from start to finish, and y axis, the number of times. So it would be a bar chart not a histogram unless y changes to percentages. (probably an option to check the last x days)
Attached Image


But I dont know how to present it. Presenting in another indicator window might be okay
Attached Image (click to enlarge)
Click to Enlarge

Name: kk.png
Size: 83 KB
, but it will be hard to read preciscely. That said, the indicator isnt intended for preciseness, it is intended for general trends in hourly nature

And then further to add, if it were bipolar, it could plot the highs bar chart and low bar chart together I guess, but that could get messy. I guess, it is the type of indicator you look at once to analyze a currency. so you can stretch out the window and close it later.

I guess, the hourly and day periods may be useful to adjust, but tbh, at the moment Id prefer it if the indicator were synched to Metatrader time/market open times and measured the amount of hourly highs and lows.

And also a little option where you can select on/off where the indicator indicates on the hourly only where the candles high and low is. maybe a little green and red dot or something. This just for visual confirmation
Thanks!!
HMSR
 
 
  • Post #104
  • Quote
  • Sep 12, 2016 10:17am Sep 12, 2016 10:17am
  •  simnz
  • Joined Nov 2015 | Status: Member | 2,523 Posts
Quoting Gorraf
Disliked
{quote} Hello simnz! I am a bit puzzled about where, and how do you want to see this: {quote} Should it write out an additional table or should it only appear in the export? It's way too monday. Could you point me to the direction, where you detailed the other inputs? Additionally, the results will show only in the grey (daily timeframe) boxes now. If there isn't any grey box, all the results will appear. {file}
Ignored
Hi Gorraf,

If it can appear in the exported table that's fine. Not necessary to print on the chart.
Practice makes a person perfect
 
 
  • Post #105
  • Quote
  • Sep 12, 2016 10:27am Sep 12, 2016 10:27am
  •  simnz
  • Joined Nov 2015 | Status: Member | 2,523 Posts
Quoting simnz
Disliked
{quote} Hi Gorraf, Thank you for the modification to the indicator for selection of positive or negative lines for display. The export button is not working and not producing the log table in files. Will it be possible to add inputs for (a) high/low of pips threshold (b) % of pips threshold linked with high/low of the negative and positive and (c) ability to print the number of times the price line has been touched by % of pips of high or low. The intention is to find out whether the price has travelled to touch high or low and come back to the...
Ignored
Hi Gorraf,
This is the post which I was referring to while requesting for additional input.
Practice makes a person perfect
 
 
  • Post #106
  • Quote
  • Sep 13, 2016 10:30am Sep 13, 2016 10:30am
  •  mikenr
  • | Joined Jun 2016 | Status: Member | 11 Posts
Hi there,

I am also after a little help with some coding

I use the attached BB ribbon filled 2 indi, which I like a lot, but I cannot get the price line to be on top of the filled BBs

I have the options set on my MT4 to 'Chart on foreground' otherwise the candlesticks are hidden.

Can anyone of you geniuses fix this for me?

Many many thanks in advance.

Mike

Attached File(s)
File Type: mq4 BB ribbon filled 2 color.mq4   3 KB | 193 downloads
 
 
  • Post #107
  • Quote
  • Sep 15, 2016 6:50am Sep 15, 2016 6:50am
  •  thomasmore
  • | Joined May 2009 | Status: Veni, Vidi, Pipsi | 91 Posts
Hello Gorraf,
Wonderfull job you are doing here! And thanks for sharing it.
If you have the time, would you take a look at the attached indicator: I would like to have a popup+sound alert, and a push alert added to it.
Thanks and best regards,
Ludo
Attached File(s)
File Type: mq4 Hurst Target.mq4   9 KB | 240 downloads
 
 
  • Post #108
  • Quote
  • Sep 15, 2016 9:59am Sep 15, 2016 9:59am
  •  Gorraf
  • Joined Aug 2016 | Status: Member | 125 Posts
Quoting Hmsr
Disliked
Hello Gorraf, I sort of have the same problem with you I know what I want, example below with x axis Hour of the day from start to finish, and y axis, the number of times. So it would be a bar chart not a histogram unless y changes to percentages. (probably an option to check the last x days) {image} But I dont know how to present it. Presenting in another indicator window might be okay{image}, but it will be hard to read preciscely. That said, the indicator isnt intended for preciseness, it is intended for general trends in hourly nature And then...
Ignored
Hello Hmsr!

Check the attached indicator. I did some limited testing with it.


Gorraf
Attached File(s)
File Type: ex4 ProblemSolving_Hmsr_160913_ind.ex4   40 KB | 183 downloads
 
 
  • Post #109
  • Quote
  • Sep 15, 2016 10:16am Sep 15, 2016 10:16am
  •  Gorraf
  • Joined Aug 2016 | Status: Member | 125 Posts
Quoting mikenr
Disliked
Hi there, I am also after a little help with some coding I use the attached BB ribbon filled 2 indi, which I like a lot, but I cannot get the price line to be on top of the filled BBs I have the options set on my MT4 to 'Chart on foreground' otherwise the candlesticks are hidden. Can anyone of you geniuses fix this for me? Many many thanks in advance. Mike {file}
Ignored
Hello mikenr!

I don't know of any setting, that can do that, but you could insert two simple lines of code, under the start() which would solce your problem:

Inserted Code
...
int start()
{
ObjectCreate(0,"Price",OBJ_HILNE,0,0,Bid);
ObjectSetDouble(0,"Price",OBJPROP_PRICE,Bid);
...

Also, don't forget to add under deinit():

Inserted Code
...
int deinit()
{
ObjectDelete(0,"Price");
return(0);
}
....

(Yeah, make it 3 lines. )

Gorraf
 
 
  • Post #110
  • Quote
  • Sep 15, 2016 10:31am Sep 15, 2016 10:31am
  •  Gorraf
  • Joined Aug 2016 | Status: Member | 125 Posts
Quoting ludo willems
Disliked
Hello Gorraf, Wonderfull job you are doing here! And thanks for sharing it. If you have the time, would you take a look at the attached indicator: I would like to have a popup+sound alert, and a push alert added to it. Thanks and best regards, Ludo{file}
Ignored
Hello ludo_willems!


I don't think solving your request would be an issue, but could you clarify it for me, when exactly do you want your computer to play Sabotage from the Beastie Boys for you?

Thaks
Gorraf
 
 
  • Post #111
  • Quote
  • Sep 15, 2016 10:59am Sep 15, 2016 10:59am
  •  Hmsr
  • | Joined May 2016 | Status: Member | 322 Posts
Gorraf is a saint, we have all been blessed.

Thanks for uploading your work
HMSR
 
 
  • Post #112
  • Quote
  • Sep 15, 2016 11:38am Sep 15, 2016 11:38am
  •  Hmsr
  • | Joined May 2016 | Status: Member | 322 Posts
Hello Gorraf bug report:

I think the lower indicator window is supposed to show lows?
Attached Image (click to enlarge)
Click to Enlarge

Name: Screenshot1.png
Size: 10 KB
HMSR
 
 
  • Post #113
  • Quote
  • Sep 15, 2016 11:58am Sep 15, 2016 11:58am
  •  simnz
  • Joined Nov 2015 | Status: Member | 2,523 Posts
Hi Gorraf,

You are a versatile coder . You coded the GoranFX_EA quickly.

Luckily, this EA can be gainfully employed in trading GBPJPY - the only pair I have been trading for last two years - and so know about its volatility in terms of pips and its ferocity in travelling in one direction in a single breath (with retracement of not more than 2 or 3 pips) of 1-3 minutes and at least 2 times in Asian session for 20 pips. This EA can be used during Asian session only. I have noticed GBPJPY's 20 pips rocket-like speed only during Asian session.

Last BOJ meeting it crashed for 200 pips in 3 minutes. Similarly it shot up by 120 pips in 2 minutes after UK retail sales last month. But news events trading is not one-way affair. The big liquidity providers trigger stops by moving on both sides before and even after news events.

GBPJPY is moving like a rocket up and down in a couple of minutes is an exceptional behaviour seen during Asian sessions only. A stoploss of 7 pips with a TP of 21 pips is good attempt . Hedging is not possible in most of the platforms because of FIFO rule.

GBPJPY volatility can be put to use by your EA.

Can I suggest inclusion of a few criterion for EA to trade:

(a) time to enter in M1 timeframe (HH:MM) - I roughly know the probable times we can try thanks to your coded speed candles. Can keep trying a few probable times during Asia session. I am not sure whether GBPJPY will behave like the one I described in any other session.

(b) speed: hits of 5 successive or repeated ticks (or hits counted in seconds)

or

(c) Pattern: Hmsr can suggest a pattern for GBPJPY. You have coded the nice pattern occurrence identifying tool.

Cheers
Practice makes a person perfect
 
 
  • Post #114
  • Quote
  • Sep 15, 2016 12:52pm Sep 15, 2016 12:52pm
  •  zoe1225
  • | Joined Jun 2016 | Status: Member | 5 Posts
Hi, I am wondering if you or anyone else on this forum could help me. I have created an indicator with EA builder but it keeps repeating the signals, would anyone be willing to help me correct this with a custom code I can paste into the EA builder script to prevent signals repeating. Ie no signals for 4 bars after an original signal or something similar.
thanks in advance.
 
 
  • Post #115
  • Quote
  • Sep 15, 2016 1:33pm Sep 15, 2016 1:33pm
  •  simnz
  • Joined Nov 2015 | Status: Member | 2,523 Posts
Hi Gorraf,

The speed candles coded by you has identified 88 occurrences of 40 pips in 1 minute for GBPJPY during last 3 months.

Attached is the screenshot of partial table and the chart.
Attached Image (click to enlarge)
Click to Enlarge

Name: 88 occurences of 40 pips in 1 minute on GBPJPY from July 14, 2016 to sept 16, 2016 - 3 months.jpg
Size: 193 KB


The latest one of 40 pips+ happened yesterday during news event.

Seeing this, I am hopeful that EA if modified will work .

Attached Image (click to enlarge)
Click to Enlarge

Name: Gorraf EA.png
Size: 103 KB
Practice makes a person perfect
 
 
  • Post #116
  • Quote
  • Sep 15, 2016 1:52pm Sep 15, 2016 1:52pm
  •  simnz
  • Joined Nov 2015 | Status: Member | 2,523 Posts
Hi HMSR/Gorraf,

Can you please explain how the indicator can be used for analysis of patterns for trading?

Can an EA be woven based on these studies?

HMSR: Please find a pattern for GBPJPY for use in EA which has been coded by Gorraf.

Thank you.
Attached Image (click to enlarge)
Click to Enlarge

Name: HMSR pattern Gorraf.png
Size: 56 KB
Practice makes a person perfect
 
 
  • Post #117
  • Quote
  • Sep 15, 2016 5:04pm Sep 15, 2016 5:04pm
  •  Gorraf
  • Joined Aug 2016 | Status: Member | 125 Posts
Quoting simnz
Disliked
Hi HMSR/Gorraf, Can you please explain how the indicator can be used for analysis of patterns for trading? Can an EA be woven based on these studies? HMSR: Please find a pattern for GBPJPY for use in EA which has been coded by Gorraf. Thank you. {image}
Ignored
I have received a PM from Hmsr several days ago, to code an indicator:
Quote
Disliked
I was wondering, would you be able to create a histogram indicator that graphs the frequency of highs occuring based on which hour of the day.

eg day 1 high occured at 6:00, so add one to 6:00 on the histogram. and then perhaps make it bipolar for lows on the bottom half. of course it wouldn't be dependant on time. on the x axis, it would be like a summary.

Since, it wasn't clear for me what he wanted, he explanation in post #103 how, and what he wants to see.

The arrows in the chart are the daily high and low values in the selected timeframe. (You can set the analyzed window to you liking, or can leave it to search highs and lows on the whole 24 Hrs period.)

The white numbers simply mark the hours of the day, ranging from 00:00-01:00, to 23:00-00:00.
The green numbers represent the occurances of highs / time of the analyzed time frame.
The red numbers represent the occurances of lows / time of the analyzed time frame.
The bars, both red and green are just a visual representation of the numbers.

Hmsr:
If you don't see the indicator as it is shown in simnz's #116 post, make the indicator window a bit larger.

simnz:
Hopefully, I will have some tome tomorrow to look into the 1M chart's code.
 
 
  • Post #118
  • Quote
  • Edited 8:53pm Sep 15, 2016 6:37pm | Edited 8:53pm
  •  Hmsr
  • | Joined May 2016 | Status: Member | 322 Posts
Okay Gorraf, so it works, it was just my window was too small to recognize it.

I have one question what do the green numbers and red numbers don't seem accurate? It's not a percentage since it doesn't add up to 100, and it's not number of times it occurred since 1970 otherwise it would have been much higher

@Simnz, I will try to get involved with your work on the weekend. It's just there is a lot of different comments here it can get confusing
Attached Image (click to enlarge)
Click to Enlarge

Name: Screenshot1.png
Size: 49 KB
HMSR
 
 
  • Post #119
  • Quote
  • Sep 16, 2016 2:04am Sep 16, 2016 2:04am
  •  cbezuid
  • | Joined Sep 2016 | Status: Member | 6 Posts
Can some one pls help me code this into MQ4...It is just n indicator showing a retracement bar that retrace more than 45%.

z = input(45, title="Inventory Retracement Percentage %", maxval=100)
// Candle Range
a = abs(high - low)
// Candle Body
b = abs(close - open)
// Percent to Decimal
c = z/100
// Range Verification
rv = b < c*a
// Price Level for Retracement
x = low + (c * a)
y = high - (c * a)
sl = rv == 1 and high > y and close < y and open < y
ss = rv == 1 and low < x and close > x and open > x
// Line Definition
li = sl ? y : ss ? x : (x+y)/2
// Plot Statement
plotshape(sl, style=shape.triangledown, location=location.abovebar, color=red, title = "Long Bar", transp = 0)
plotshape(ss, style=shape.triangleup, location=location.belowbar, color=green, title = "Short Bar", transp = 0)
plot(li, style = line, color = blue, title = "Inventory Bar Retracement Price Line")
 
 
  • Post #120
  • Quote
  • Sep 16, 2016 3:05am Sep 16, 2016 3:05am
  •  Gorraf
  • Joined Aug 2016 | Status: Member | 125 Posts
Quoting Hmsr
Disliked
Okay Gorraf, so it works, it was just my window was too small to recognize it. I have one question what do the green numbers and red numbers don't seem accurate? It's not a percentage since it doesn't add up to 100, and it's not number of times it occurred since 1970 otherwise it would have been much higher @Simnz, I will try to get involved with your work on the weekend. It's just there is a lot of different comments here it can get confusing {image}
Ignored
The theoritical, programmable limit is 01. January 1970.

Now, while you can set this date, or any other date, the EA can only gather data from the hourly bars, that is presented in the metatrader.

While, in the metatrader settings you can set it to show more or less bars, it will probably newer will be able to show you all the bars going back to 1970.

The green and red numbers are simple counters.
 
 
  • Platform Tech
  • /
  • Free Coding request
  • Reply to Thread
    • 1 45Page 678 32
    • 1 5Page 67 32
0 traders viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2023