Forum

How to chance funny numbers input fields

I'm trying to add some external var so i can change the colors on the indicator lines. #property indicator_chart_window #property indicator_buffers 5 #property indicator_color1 Black #property indicator_color2 Blue #property indicator_color3 Red #property indicator_color4 DodgerBlue #property

How can i draw a dot on my chart?

I would like to have a dot on my screen everytime a specific pattern is reached. I can see that something like this could be used: SetIndexArrow(2, 251); // cross code in Wingdings But i'm sure i need more code than this one line

How do i use iCustom correctly?

I have this indicator on my chart to show me CCI divergence. What I want to do is grap the signal from the indicator into an EA and then for now just give me an alert so I can see the EA has got the signal. For some reason i'm not allowed to show the indicator here, it says 'The text is too long'

Why don’t we make a template for an EA - just a suggestion

Why don’t we make a template for an EA with code for handling 4/5 digits brokers and some code to handle the ECN/STP brokers issue, so newbies like me and others can use that every time we want to create a new EA. It will save a lot time for everybody in here. RaptorUK , WHRoeder and other good

EA doesn't take the trade because of invalid price

I have an OCO EA where it doesn't take the trade because it seems that price containg to many digits. Error in the 'Journal' tab: 'invalid price 1.59805567 for order send function' (i'm using 5 digit broker) Here is the code that should send the trade order and below that is a function called

How to get the value of e.g. price and CCI

I have created a script where i can 'grab' date, time within a certain periode of time and then write all the data into a file and that part works fine. I'm also interested to get the price and the value of e.g. CCI(14) and write that to the file. The script looks like this, but the price and CCI

How to avoid the first alert when attach to a chart

Hi, I have this code below and it gives me an alert every minute. That works fine, but it also gives me an alert when i attach it to a chart and the first tick come in and i don't want that. How can i avoid that first alert? #include <stdlib.mqh> #include <WinUser32.mqh> int init() {

How do i check if current bar high is 2 pips greater that previous bars high?

I have tried with this code below but it doesn't seem to work. Also tried with just +2 doesn't work eather. if (High[i] > High[i+ 1 ]+ 0.0002 ) //2 pips { some code } //if

Read candlesticks from two different currency pair

Can anyone point me to some code that shows how to "grab" candlestik informations and compare two candles on two different currency pair ? Here is what is want to do. Let say i have a candle @ 10:00am on the GBPUSD. I want to be able to read the high, low, open & close on that candle at that

Problems with showing results of doubles

I have the following code: double RangeSize = High[ 1 ] - Low[ 1 ]; Comment ( "Range = " + RangeSize) It shows 0.00099000 If i want it to show it in pips (like 9.9pips) . How can i do that? What is the correct if-sentence if i want to ask if RangeSize is lower than 5pips