-
Play videoPlease edit your post.
For large amounts of code, attach it.
- Your risk calculation is bogus
- 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)
- 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
thanks WHRoeder for your concern . i'm not good in coding but i can read the code and make changes on it as i need .so could you give me more detail to understand .
can you tech me how to solve this issues ?
thanks
#include <stdlib.mqh>
#include <WinUser32.mqh>
int start()
{
//----
//----
int ticket=OrderSend(Symbol(),OP_BUYSTOP,0.01,Bid+30*Point,1,0,Bid+50*Point,"Buy ",255,TimeCurrent()+7200,CLR_NONE);
if(ticket<1)
{
int error=GetLastError();
return(0);
}
//----
OrderPrint();
return(0);
}
-
Play videoPlease edit your post.
For large amounts of code, attach it.
int ticket=OrderSend(Symbol(),OP_BUYSTOP,0.01,Bid+30*Point,1,0,Bid+50*Point,"Buy ",255,TimeCurrent()+7200,CLR_NONE);
No stop loss. All open orders became loses.
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
//+------------------------------------------------------------------+
no error when compile it. but i test it on data from 1-5-2016 to 30-5-2016 with amount 100$ is gives profit 554$ but it down to 77$ i will upload the out of the output i'm using MT4 for fxpro
Thanks