Dose it posible to creat any function of "mql code" posting in this forum?

 

i just seen a forum that has the function of posting mql code into the forum

it's easier and automatically change the color into the Metaedtor-like scheme

this will be more helpful to post the code here without attacthing files

hope this is posible and someone expeert can creat it

 
phoenix:
i just seen a forum that has the function of posting mql code into the forum

it's easier and automatically change the color into the Metaedtor-like scheme

this will be more helpful to post the code here without attacthing files

hope this is posible and someone expeert can creat it

I think you could wrap the code with PHP tags. The button is on the right of the editing tools (bold, italic, underline, etc.). Hope this help

Example :

if(subTotalTrade()>0 && TrailingStop>0)

{

total = OrdersTotal();

for(cnt=0;cnt<total;cnt++)

{

OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);

if(OrderType()<=OP_SELL &&

OrderSymbol()==Symbol() &&

OrderMagicNumber()==MagicNumber)

{

subTrailingStop(OrderType());

}

}

}
 
phoenix:
i just seen a forum that has the function of posting mql code into the forum

it's easier and automatically change the color into the Metaedtor-like scheme

this will be more helpful to post the code here without attacthing files

hope this is posible and someone expeert can creat it

This is very helpful idea!

But we are talking about vBulletin addon which need a lot of work!

Do you have link to this addon or the forum?

 

- webget dll: work with url, remote computer, calendars and so on.

 

how to lock source code (mql4 program protection codes): this Codersguru article and this thread on our forum.

how to lock the functions: the thread is here.

Money Management.

Recall result of last trade.

Controlling number of trades.

 

How do I code an EA to enter a trade at the open of a new candle?

Hi everyone,

Please forgive my ignorance, but I am new to the programming side of MQL4.

What I am trying to accomplish is enter one trade at the open of a new candle.

For example, if I had a 30min chart open, I would like to enter one trade at the open. Or if I had a 4hour chart open, how would I enter the trade at the open of that chart?

Also, I would like to enter only 1 trade at the open. I have tried a few commands and found it either entering the trade many times during the first minute, or not at all.

I have tried the "time current" function as well as "if minute = XXXX". The EA works when I backtest it, but when I try to put it on my live demo, it only works once in a while.

Any input would be greatly appreciated.

Thanks in advance.

 

Moved your post to this thread where you will find some links about how to code one trade oer candle etc.

besides there are some other threads:

https://www.mql5.com/en/forum/173026

https://www.mql5.com/en/forum/general

 

- Trade context is busy: how to solve this problem.

- Trading Times Enhancement: very usefull code about only trade during certain periods.

- avoid plotting the EA on the wrong chart: some usefull codes about EA and certain timefame to trade.

- Use GlobalVariableGet() in an indicator: good thread with codes and explanation.

- List of Arrow Style and others like like fractal, circle, arrow up, arrow down and so on.