Ask! - page 156

 

Hi Can anyone tell me how to get rid of the periods on this indicator?

Files:
pic_1.jpg  63 kb
 
increase:
Hi Can anyone tell me how to get rid of the periods on this indicator?

Set the label property of each of the buffers to an empty string.

SetIndexLabel(0,"");

You can also set the IndicatorShortName to an empty string to get rid of that if you want.

Lux

 
luxinterior:
Set the label property of each of the buffers to an empty string.

SetIndexLabel(0,"");

You can also set the IndicatorShortName to an empty string to get rid of that if you want.

Lux

Thanks thats great just need to fix the bar label please

Files:
pic_2.jpg  17 kb
 

Trade once per Bar

Ola!

Thank you, all CodeMasters, for your help.

Problem:

EA enters trades per Fractals signals, exits by Heiken Achi Smoothed.

Every now and then both indicators fight - Fractals opens a trade, Heiken closes it imediately... constantly on one bar (Balance goes waaay down).

I would like to code EA to only trade once per bar, like if there is order in History on current day, no more trading for today.

Thank you for your cooperation,

Have fun,

Simon

 

Trade once per Bar - Answer found

Ola!

I have found answer to my previous post / question.

I used this piece of code:

variabiles:

datetime CheckEntryTime;

code before trading:

if (CheckEntryTime == iTime (NULL, 0, 0)) return(0);

else CheckEntryTime = iTime (NULL, 0, 0);

------------------------------------------------------------------

Next question:

How can we code SL to be set at previous bar either close or open, extern variable?

Have fun,

Simon

 

HELP - Implementing Pause Duration on EachTickON EA

Hello,

I am attempting to implement an adjustable pause break into my (EachTickOn) EA.

Looking to pause the EA once a position has opened & set a time period (i.e. 30 min or 1 hour later) for it to start up again.

Been Playing around with below script for last two weeks... & still no go

Tried multiple variations...nothing

//Global Variable

bool OkToTrade=false;

int SecondsToWait=3600; // 3600 seconds = 1 hour

if (CurTime() > LastTime0 + SecondsToWait)

{

LastTime0=CurTime();

OkToTrade=true;

{

else

{

OkToTrade=false;

}

Will not demo or backtest, EA acts as if code is not present.

I would greatly appreciate any help...THANK YOU

 

Question

What is easier to read for an expert advisor an .TXT or an .CSV file?

Or does it not matter?

Kind regards,

Seek3

 

Mutliple Profit targets

Hi there,

I am absolutely new to this programming language and would like a little help understanding a few things. Specificly, how to split up a position into mutliple profit targets. For example, a long entry enters into the market with a volume of 4 lots, after 100 pips of profit it lets go of 2 lots; at 140 pips it lets go of 1 lot; and, at 150 pips of profit it lets go of the remaining lot.

 

Why EA always trade 2 bars late

Good day All,

Thanks a lot for sharing and helping us, newbies to MQL and EAs.

I have some EAs I wrote and am trying out. Strategy does seem to be OK. BUT EA always trades 2 - 3 bars after the signal. Manually it should have traded at the right time but yet the EA always trades late. I found some other people with the same problem but no answer,

Could you please assist, am I setting something wrong?? All my inidcators are on Close prices, but manually and checking it visually the EA should have traded 2 -3 bars earlier than it does.

Thanks for your assistance it is appreciated.

Regards

Sol

 

hi all,

I am a trader but I don't know about mq4 language and have been trying to do this since tuesday ...

I need to save my chart in csv format using a script. I got a nice script that I can simply drag it on any chart and any timeframe and it does just nice, except the filename.

I wish that it can automatically generate unique out filename every time I save the chart so i dont have to rename it every time I save another file in the same folder.

string fname = [date in YYYYMMDD format] + "_"+[date - hour only]+"_" + Symbol() + Period() + ".csv";

The code in question are in bold.

When I got the code right, I think the output filename will look like this

20090924_10_GBPJPY15.csv

Sorry that I can't spend much time to read 157 pages of this huge thread (I had tried and my head gone dizzy)

Thank you in advance.

Reason: