Questions from Beginners MQL5 MT5 MetaTrader 5 - page 507

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Thanks, I downloaded and installed it, good stuff... Do you know anything similar with stock quotes? I want to try stock CFD, my broker has lots of stocks, good and different ones... :)
Please tell me how to make it buy once and after take profit it does not do anything - it waits for new breakthrough (the code is written as - if (cena>ma && cena> ma2 && cena> Ma && cena>Ma1) ???
Check the type of the last closed position, if it was a buy then do not reopen the buy position, but wait for the sell signal and vice versa.
The GetTypeLastClosePos() function.
This function returns the type of the last closed position, or -1. A more accurate selection of positions to be considered is defined by external parameters:
if(Ask ==("line "+100*Point))
buy
iMA - data of the MA indicator
Why is it an asc and not a bid or is it not important?
Apparently wants to overplay the spread as buy opens on asc, but on bid would be a more correct condition.
Why is it an asc and not a bid, or does it not matter?
...to buy oriented to the Bid indicator, to sell on the contrary . it is so that the advisor would work on the indicator, taking into account the spread
I guess it's the other way around.)
И... which "indicators" are you talking about? ))))
I have a follow-up question --- how to make for example a buy within 100-200 points of a line, I only have a code for exactly 100 if(Ask ==("line "+100*Point)) ) for example between 100 and 300 pips) or it may be that when I reach 100 pips it does not buy because the market moved fast etc. -( with a strong move (eg (Non Farm) - ) personally I had a big delay before I closed the position or a stop loss when I dragged the line)
I have a follow-up question --- how to make for example a buy within 100-200 points of a line, I only have a code for exactly 100 if(Ask ==("line "+100*Point)) ) for example between 100 and 300 pips) or it may be that when I reach 100 pips it does not buy because the market moved fast etc. -( with a strong move (eg (Non Farm) - ) personally I had a big delay before I closed the position or a stop loss when I dragged the line)