[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 270

 

Please help, if any of you can, to write the code for the following condition:

"if, an order was closed by TakeProfit, after crossing a moving average, then do not open any more trades in that direction until the price crosses the moving average in the opposite direction".

Thanks in advance for your help!

 
drknn:

A tick has come, the terminal calls the EA's start() function. You state that the value returned by this function is indifferent to the terminal. Is this documented anywhere?
It's from Roman law. It's not forbidden, so it's allowed. Above I gave a link to the help section. In our case it sounds like this: no behaviour is described, so it doesn't matter.
 
Please advise where and how best to test an EA! That would be as close to the truth as possible! I tried to test it on the terminal WorldForex on M1. Then on the same time frame with the same parameters it shows different results! Why? (Since this thread was created for newbies, I'll leave my silly question here! )))))
 
Zhunko:
This is from Roman law. It's not forbidden, so it's allowed. Above I gave a link to the reference section. In our case, it sounds like: no behaviour is described, so it doesn't matter.

Thank you. Noted. I'm interested in the developers opinion on these return codes. What do you think?
 
Andrew1001:
Please advise where and how best to test an EA! That would be as close to the truth as possible! I tried to test it on the terminal WorldForex on M1. Then on the same time frame with the same parameters it shows different results! Why? (Since this thread was created for newbies I will leave my stupid question here! )))))

The dealing centres which use MetaTrader, they all take the terminal installation from Metakvotes (It's here - https://www.metaquotes.net/ru) and simply paste there the settings for their trading servers and add their own icon for the terminal shortcut. Because of this you can not differentiate between terminals of MT4 family from different brokerage companies. The best way is to download the terminal from the developer(from here) and connect to the trading account of your brokerage company via it. In general, the developer's product is almost always better than the product in which someone other than the developer stuck his hands.
 
Andrew1001:
Please advise where and how best to test the EA! That would be as close to the truth as possible! I tried to test it on the terminal WorldForex on M1 but it show one result first. Then on the same time frame with the same parameters it shows different results! Why? (Since this thread was created for newbies, I'll leave my silly question here! )))))

It is better to test on the quotations of your brokerage company, but not on any third-party ones.

Because you have to use these quotes to fight for the truth... :-) Although he can make the history for himself, and do anything, so contact the technical support clients of your WorldForex and ask what the fuck...?! It's possible that the different results are due to the floating spread size!

 
okvseok:

Please help, if any of you can, to write the code for the following condition:

"if, an order was closed by TakeProfit, after crossing a moving average, then do not open any more trades in that direction until the price crosses the moving average in the opposite direction".

Thanks in advance for your help!


OK, I can help you write the code. But I don't think anyone would want to do it for you. What is the problem? You don't understand the code algorithm, or do you expect to get a ready-made code?

 
okvseok:

Please help, if any of you can, to write the code for the following condition:

"if, an order was closed by TakeProfit, after crossing a moving average, then do not open any more trades in that direction until the price crosses the moving average in the opposite direction".

Thanks in advance for your help!

Here - I.V. Kim's function + see in the textbook the work with flags - example, to help you. No freebies here. If you don't know what you're doing or can't figure out the stuffing, go straight to the john.
 
Roman.:
Here - I.V. Kim's function + see in the textbook the work with flags - example, to help you. No freebies here. If you don't know what you're doing or can't figure out the stuffing, go straight to the john.

Do you think he will know how to click on the zhoba? It looks too much like a message to another address ;)
 
drknn:

Do you think he will guess to click on the wormhole? It looks too much like a directing to another address ;)


:-)

He will figure it out. He himself (judging by the content of the question) will not cope, he is not familiar with the textbook, so the first two references are unnecessary.

Referral to the "zhoba" - standard for such questions, because there is no freebies.

Reason: