[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 80

 
pskov748 >> :

RefreshRates();

Please help or is autotrading disabled on server ? Forex.com I don't understand .Above code, maybe add what.

See the link in the previous message from goldtrader...

 

This is the response we have just received from DC on a support request for pskov748 :

//-------------------------------------------

We provide expert advisors, but we do not support the work of expert advisors. If you have any questions about EAs functionality, you need to contact the company where you have got the program

//--------------------------------------------------------

Strange answer. "Provide, but do not support..."



 

The question is as follows. I wrote an EA and when tested on historical data it works fine - as it was designed and correct (signals, trades are made correctly). But when I launch it to work in real time, it works not so (signals, for example, are not issued when they should be, or they are issued, but at other times at other prices and for unknown reasons). I.e. everything is OK on history, but not so on real. I do not understand how it may be! How to fix it? Maybe I should do something in the terminal or in the program code?

 
Roger >> :

You know, I had a similar experience, I struggled and struggled, I put delays - no progress. Then I checked if order was closed by

if(OrderCloseTime()!=0)

All my problems disappeared at once. Try it.

Idea, I'll give it a try, thank you.

 
andws писал(а) >>

The question is as follows. I wrote an EA and when tested on historical data it works fine - as it was designed and correct (signals, trades are made correctly). But when I launch it to work in real time, it works not so (signals, for example, are not issued when they should be, or they are issued, but at other times at other prices and for unknown reasons). I.e. everything is OK on history, but not so on real. I do not understand how it may be! How to fix it? Maybe I should fix something in the terminal or in the program code?

If the strategy is built on indices, then most likely, the reason lies in them.

 

inprice=iCCI(_smb,1440,50,PRICE_TYPICAL,0);

Folks, clear your doubts, too lazy to test. If I query this variable every minute, will its values be different??? Or do the buffers fix the value???

 

Dear MQL connoisseurs!


extern int PROFIT=20;

if (OrderProfit() > PROFIT) {......}

or

if (OrderProfit() > PROFIT*Point) {.....}


What is the correct way?

Thank you.

 
hhohholl >> :

Dear MQL connoisseurs!


extern int PROFIT=20;

if (OrderProfit() > PROFIT) {......}

or

if (OrderProfit() > PROFIT*Point) {.....}


Which is correct?

Thank you.

If (OrderProfit() > PROFIT*Point) {.....}

 
zfs писал(а) >>

if (OrderProfit() > PROFIT*Point) {.....}

Why is this the case? The order profit is given in pips.

 
zfs писал(а) >>

inprice=iCCI(_smb,1440,50,PRICE_TYPICAL,0);

Folks, clear your doubts, too lazy to test. If I query this variable every minute, will its values be different??? Or do the buffers fix the value???

Of course it will be different.