Write an advisor - page 6

 
Андрей:

Pascal teaches how to use different types of variables, and how to translate from one type to another. Teaches how to use normal loops and conditions. It teaches how to use procedures and functions. In BASIC this is not there at all, just plain text in English with mathematical formulas pasted in. After learning BASIC, a person will only understand i=i+1. There's nothing else there.


Basic is an untyped language, like PHP, remember? Or am I mistaken? I haven't touched it in a thousand years, probably since Sinclair's time.

 
George Merts:

I don't know, I don't know.

Pascal - really, nothing much will change. Because if you don't use all sorts of OOP nonsense, Pascal isn't much different from Basics.

Not to say that VBA is very much used language. I don't understand what's "abnormal" about it?

Some time ago (at the beginning of 90s) I developed an expert system for searching faults in complicated radio-electronic devices. I used a book "Expert Systems". There the examples were in BASIC. The author in the preface in defense of BASIC wrote that some important and quite complex programs used by the Pentagon were written in BASIC.
 

Friends. in my opinion, programming is like medicine. You can't just be a doctor now, just like you can't be a programmer. What matters is the direction. It is unlikely that a proctologist can help a patient with bad teeth. The general concepts for different languages are similar, but the whole point is in the details. The only thing is that the latest trends come from WEB-programming. All functionality will eventually be created in frameworks

 
ikascorp:
I want to ask a slightly strange question. How hard is it to learn how to write an EA yourself? (Please do not offer to teach for money). Do I have to know programming or something like that? Or there are programmes that write the code themselves and we have to specify the indicator, the time of entry, etc..

What do you need it for?

If you have a need for it, you may write it. If you do not - do not waste your time.

ps "xxx: do you know the difference between "if" and "if only"?
yyy: if - there is no such operator in 1C
yyy: that's the difference" (с)
 

Hi all!

Please someone write the following function:

After opening a trade, after 40 seconds if the profit is more than 15 pips, the trade is closed instantly, if less, the takeprofit is moved to the profit level of 15 pips.

Thank you in advance.

 
vestmd:

Hi all!

Please someone write the following function:

After opening a trade, after 40 seconds if the profit is more than 15 pips, the trade is closed instantly, if less, the takeprofit is moved to the profit level of 15 pips.

Thank you in advance.


What if I lost? What do I do?

 
Vladimir Karputov:

What if it is negative? What to do?


Takeprofit is set as agreed.

 
vestmd:

Hi all!

Please someone write the following function:

After opening a trade, after 40 seconds if the profit is more than 15 pips, the trade is closed instantly, if less, the takeprofit is moved to the profit level of 15 pips.

Thanks in advance.


N seconds N points.mq5 version "1.000"

In general it tracks all positions by the symbol on which it is running and by the specified magik.

Files:
 
Vladimir Karputov:

N seconds N points.mq5 version "1.000"

In general, it tracks all positions by the symbol on which it is running and by the specified magic number.

Thanks, I forgot to mention that I need it for MQL4 and would like to attach this function to my robot.

 
vestmd:

Thank you, I forgot to mention that I need it for MQL4 and I want to attach it to my trading robot.


You placed your question in MQL5 forum, that's why you received the answer for MetaTrader 5. There is a special thread for the old terminal:MQL4 and MetaTrader 4.

Reason: