[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 127
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
When you run it in real life " step*point will become > current loss, then profit will come to you" you'll see your profit becomes a fixed minus .... Because of the broker's work ... I didn't set the take profit for nothing, it's already checked ..........
Idea number 5 TS - Own Pattern ( Sample ). There is a drawing there too. The TS and trading criteria are simple and
It will not take a good programmer much time. Doesn't anyone want to see the results?
Try opening a demo account with 1:1 leverage. And test it.
Will it work?
Could you please tell a novice programmer how to select the last closed trade using the OrderSelect function? I tried to do it this way: OrderSelect(1,SELECT_BY_POS,MODE_HISTORY), but apparently no order is selected this way...
Take a look here: https://www.mql5.com/ru/forum/131859
-page #4
GetTypeLastClosePos - Returns the type of the last closed position or -1
GetTypeLastOpenPos - Return the type of the last opened position or -1
isCloseLastPosByStop - Returns the flag of the last position closed by Stop
isCloseLastPosByTake - Returns the flag to close the last position by Take.
isLossLastPos - Returns the flag of loss of the last position.
isTradeToDay - Returns the flag of trading today
NumberOfBarCloseLastPos - Returns the bar close number of the last position or -1.
NumberOfBarOpenLastPos - Returns the bar number of the last position opened or -1.
NumberOfLossPosToday - Returns the number of losing positions closed today.
PriceCloseLastPos - Returns the closing price of the last closed position.
Can you advise a novice programmer, how to select the last closed order using OrderSelect function? I tried to do it this way: OrderSelect(1,SELECT_BY_POS,MODE_HISTORY), but apparently no order is selected this way...
Try it this way:
Note that only Buy or Sell is checked in the loop. Hopefully you will be able to make a selection of other order types based on this
ZS... I was writing on my hands and might have missed a mistake somewhere...
Please tell me why this function does not work and how to make it work?
nomer_sdelki=OrderSend(Symbol(),OP_SELL,1,Bid,3, Bid-10*Point,Ask+10*Point, "My order #"+1,16384,0,Green);
------------------------------------------------------------------------------------------------------------------------
And this is how it works!!!
nomer_sdelki=OrderSend(Symbol(),OP_SELL,koefficent,Bid,3,0,0, "My order #"+1,16384,0,Green);
i.e. when no stops are set it works.
------------------------------------------------------------------------------------------------------------------------------
This function doesn't work either, how can I fix it?
OrderClose(nomer_sdelki,koefficent,Bid,3,Red);
-----------------------------------------------------------------------------------------------------------------------------------
Try opening a demo account with 1:1 leverage. And test it.
Will it work?
It's a miracle...
There was a message and then there wasn't...
I'll answer: Is this what it takes?