I have been trying to code my system "Freebie Newbie System" into an EA and i have gotten it going pretty good but right now i am trying to add something so you can use it with manual confirm. I cant seem to get it to only alert with a popup order box only once per new order. With this it should beable to be unchecked and the EA will enter without having to do anything, if checked then you would have to confirm the order before it is placed.
I am not attaching the EA for a few reason
1) It is not finished
2) I have been lied to ALOT! by people that say they will help only to "steal" the code and never reply to me again.
3) You dont need an EA code to tell me how to add a few lines of code that will make it only alert once per signal.
This is what i have in the code right now since it works on the indicators but doesnt seem to work on the EA. Any help would be great.
Thanks
Dredding82
if(OrdersTotal()<MaxOrders)
{
if(SignalBUY=="true")
{
if(RiskMangement) {
Lots=GetLots(BSL,StopLoss,margin);// risk calculation
}
if(UseRiskRewardTakeProfit) {
TakeProfit = NormalizeDouble(RiskRewardTakeProfit_Ratio * StopLoss,0);
}
if (margin > 75) return; // if not enough margin do nothing
if(HideSL==false&&StopLoss>0){SL=Ask-StopLoss*pointz;/*OPP=Bid-StopLoss*pointz;SLP=Bid;*/}else {SL=0;/*SLP=0;*/}
if(HideTP==false&&TakeProfit>0){TP=Ask+TakeProfit*pointz;/*TPP=Bid-(TakeProfit*2)*pointz;*/}else {TP=0;/*TPP=0;*/}
if(HideSL==false&&HedgeSL>0)SLH=Bid+HedgeSL*pointz;else SLH=0;
if(HideTP==false&&HedgeTP>0)TPH=Bid-HedgeTP*pointz;else TPH=0;
while(Ticket<=0 && number<tries){
if(ECN) {
if (TimeOpen < Time[0]) // I can trade this bar
TimeOpen = Time[0];
Ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,0,EAName,Magic,0,Blue);
if(Ticket>0) ecnmodify(OP_BUY, Ticket, Bid, SL,TP);
} else {
if (TimeOpen < Time[0]) // I can trade this bar
TimeOpen = Time[0];
Ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,SL,TP,EAName,Magic,0,Blue);
//if(Hedge)TicketH=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,SLH,TPH,EAName,Magic,0,Red);
//if(ReverseAtStop&&StopLoss>0)TicketP=OrderSend(Symbol(),OP_SELLSTOP,Lots,OPP,Slippage,SLP,TPP,EAName,Magic,Expire,Red);*/
}
if(Ticket<=0) number++;
}
}
}
if(SignalSELL=="true")
{
if(RiskMangement) {
Lots=GetLots(SSL,StopLoss,margin);// risk calculation
}
if (UseRiskRewardTakeProfit) {
TakeProfit = NormalizeDouble(RiskRewardTakeProfit_Ratio * StopLoss,0);
}
if (margin > 75) return; // if not enough margin do nothing
if(HideSL==false&&StopLoss>0){SL=Bid+(StopLoss*pointz);/*OPP=Ask+StopLoss*pointz;SLP=Ask;*/}else {SL=0;/*SLP=0;*/}
if(HideTP==false&&TakeProfit>0){TP=Bid-TakeProfit*pointz;/*TPP=Ask+(TakeProfit*2)*pointz;*/}else {TP=0;/*TPP=0;*/}
if(HideSL==false&&HedgeSL>0)SLH=Ask-HedgeSL*pointz;else SLH=0;
if(HideTP==false&&HedgeTP>0)TPH=Ask+HedgeTP*pointz;else TPH=0;
while(Ticket<=0 && number<tries){
if(ECN) {
if (TimeOpen < Time[0]) // I can trade this bar
TimeOpen = Time[0];
Ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,0,0,EAName,Magic,0,Red);
if(Ticket>0) ecnmodify(OP_SELL, Ticket, Bid, SL,TP);
} else {
if (TimeOpen < Time[0]) // I can trade this bar
TimeOpen = Time[0];
Ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,SL,TP,EAName,Magic,0,Red);
//if(Hedge)TicketH=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,SLH,TPH,EAName,Magic,0,Blue);
//if(ReverseAtStop&&StopLoss>0)TicketP=OrderSend(Symbol(),OP_BUYSTOP,Lots,OPP,Slippage,SLP,TPP,EAName,Magic,Expire,Red);
}
if(Ticket<=0) number++;
}
}
if(Ticket<0) Print("Error opening order! ",errordescription(GetLastError()));
}
}
return(0);
I am not attaching the EA for a few reason
1) It is not finished
2) I have been lied to ALOT! by people that say they will help only to "steal" the code and never reply to me again.
3) You dont need an EA code to tell me how to add a few lines of code that will make it only alert once per signal.
This is what i have in the code right now since it works on the indicators but doesnt seem to work on the EA. Any help would be great.
Thanks
Dredding82
if(OrdersTotal()<MaxOrders)
{
if(SignalBUY=="true")
{
if(RiskMangement) {
Lots=GetLots(BSL,StopLoss,margin);// risk calculation
}
if(UseRiskRewardTakeProfit) {
TakeProfit = NormalizeDouble(RiskRewardTakeProfit_Ratio * StopLoss,0);
}
if (margin > 75) return; // if not enough margin do nothing
if(HideSL==false&&StopLoss>0){SL=Ask-StopLoss*pointz;/*OPP=Bid-StopLoss*pointz;SLP=Bid;*/}else {SL=0;/*SLP=0;*/}
if(HideTP==false&&TakeProfit>0){TP=Ask+TakeProfit*pointz;/*TPP=Bid-(TakeProfit*2)*pointz;*/}else {TP=0;/*TPP=0;*/}
if(HideSL==false&&HedgeSL>0)SLH=Bid+HedgeSL*pointz;else SLH=0;
if(HideTP==false&&HedgeTP>0)TPH=Bid-HedgeTP*pointz;else TPH=0;
while(Ticket<=0 && number<tries){
if(ECN) {
if (TimeOpen < Time[0]) // I can trade this bar
TimeOpen = Time[0];
Ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,0,EAName,Magic,0,Blue);
if(Ticket>0) ecnmodify(OP_BUY, Ticket, Bid, SL,TP);
} else {
if (TimeOpen < Time[0]) // I can trade this bar
TimeOpen = Time[0];
Ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,SL,TP,EAName,Magic,0,Blue);
//if(Hedge)TicketH=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,SLH,TPH,EAName,Magic,0,Red);
//if(ReverseAtStop&&StopLoss>0)TicketP=OrderSend(Symbol(),OP_SELLSTOP,Lots,OPP,Slippage,SLP,TPP,EAName,Magic,Expire,Red);*/
}
if(Ticket<=0) number++;
}
}
}
if(SignalSELL=="true")
{
if(RiskMangement) {
Lots=GetLots(SSL,StopLoss,margin);// risk calculation
}
if (UseRiskRewardTakeProfit) {
TakeProfit = NormalizeDouble(RiskRewardTakeProfit_Ratio * StopLoss,0);
}
if (margin > 75) return; // if not enough margin do nothing
if(HideSL==false&&StopLoss>0){SL=Bid+(StopLoss*pointz);/*OPP=Ask+StopLoss*pointz;SLP=Ask;*/}else {SL=0;/*SLP=0;*/}
if(HideTP==false&&TakeProfit>0){TP=Bid-TakeProfit*pointz;/*TPP=Ask+(TakeProfit*2)*pointz;*/}else {TP=0;/*TPP=0;*/}
if(HideSL==false&&HedgeSL>0)SLH=Ask-HedgeSL*pointz;else SLH=0;
if(HideTP==false&&HedgeTP>0)TPH=Ask+HedgeTP*pointz;else TPH=0;
while(Ticket<=0 && number<tries){
if(ECN) {
if (TimeOpen < Time[0]) // I can trade this bar
TimeOpen = Time[0];
Ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,0,0,EAName,Magic,0,Red);
if(Ticket>0) ecnmodify(OP_SELL, Ticket, Bid, SL,TP);
} else {
if (TimeOpen < Time[0]) // I can trade this bar
TimeOpen = Time[0];
Ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,SL,TP,EAName,Magic,0,Red);
//if(Hedge)TicketH=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,SLH,TPH,EAName,Magic,0,Blue);
//if(ReverseAtStop&&StopLoss>0)TicketP=OrderSend(Symbol(),OP_BUYSTOP,Lots,OPP,Slippage,SLP,TPP,EAName,Magic,Expire,Red);
}
if(Ticket<=0) number++;
}
}
if(Ticket<0) Print("Error opening order! ",errordescription(GetLastError()));
}
}
return(0);