- Create a distance of 10 pips between positions
- How to get the latest open position?
- [ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4.
Giovanni Guastella: I explain this problem now
| If you can't explain the problem, you can't code a solution. Your post is unintelligible to me. |
- Compare market to open price and open another. learn to code it, or pay (Freelance) someone to code it.
We're not going to code it for you.
We are willing to help you when you post your attempt (using SRC) and the nature of your problem. - No stop loss means you have infinite risk.
- You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
- Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip but it takes account of the exchange rates of the pair vs. your account currency.)
- Do NOT use TickValue by itself - DeltaPerLot
- You must normalize lots
properly and check against min and max.
- You must also check FreeMargin to avoid stop out
I'm not telling anyone to make me an EA. Just a little hand for this step.
Thank you
I'm not telling anyone to make me an EA. Just a little hand for this step.
WHRoeder has already answered in step 1 - "Compare market to open price and open another".
You select the order with "OrderSelect()" and you compare the "OrderOpenPrice()" with the current market price "OrderClosePrice()" and if they differ by more than what you have defined, you place a new "OrderSend()".
You should read the documentation and familiarize yourself will all the aspects of MQL and all the possible functions and parameters. That is why WHRoeder, stated that you need to "learn it" or "hire someone" to do it for you if you are unable to.
WHRoeder has already answered in step 1 - "Compare market to open price and open another".
You select the order with "OrderSelect()" and you compare the "OrderOpenPrice()" with the current market price "OrderClosePrice()" and if they differ by more than what you have defined, you place a new "OrderSend()".
You should read the documentation and familiarize yourself will all the aspects of MQL and all the possible functions and parameters. That is why WHRoeder, stated that you need to "learn it" or "hire someone" to do it for you if you are unable to.
Giovanni Guastella:, but I was stuck on this step.
| Asked and answered: "We are willing to help you when you post your attempt (using SRC) and the nature of your problem." |
{
double PreviousChipmunk = iMA (Symbol(),0,Cperiod,Cscostamento,Cmetodo,Capplica,2);
double Chipmunk = iMA (Symbol(),0,Cperiod,Cscostamento,Cmetodo,Capplica,1);
double PreviousTurtle = iMA (Symbol(),0,Tperiod,Tscostamento,Tmetodo,Tapplica,2);
double Turtle = iMA (Symbol(),0,Tperiod,Tscostamento,Tmetodo,Tapplica,1);
if (PreviousChipmunk<PreviousTurtle && Chipmunk>Turtle)
{
if (OrdersTotal()==0 )
ticket=(OrderSend (Symbol(),OP_BUY,Lotto,Ask,3,0,Ask+(TakeProfit*Point),"buy",1234,0,clrGreen));
}
if (OrdersTotal()==1)
{
OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES);
if( OrderOpenPrice() > 200*Point) {
ticket2=(OrderSend (Symbol(),OP_BUY,Lotto,Ask,3,0,Ask+(TakeProfit*Point),"buy 2",12345,0,clrGreen));
}
}
// in this way does not work ... I can not find an example that can help me (of course we all understand that I'm a newbie on mql :))
// maybe i will do a bool? loss=(OrderOpenPrice() - OrderClosePrice())?
// i have need him open the trade after 200 pips down, but not work fine
Asked and answered: "We are willing to help you when you post your attempt (using SRC) and the nature of your problem." |
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use