Helping create an ea.

 

Hi guys,i'm looking into making a simple martingale ea but i think i encountered a dead end.

So,the function send_order buy/sell should do the thing it intends to do.I appeal and  it should open a new sell/buy order with the volume increased by the lot_multiplicator but it says "'volume1' - undeclared identifier"

Also,if someone could enlighten me please,what is  the code that after a certain number of pips, a new market order would occur.(this is the biggest issue).




#property copyright "Domnul T"
#property link      "www.primumilion.com"
#property version   "1.00"
#property strict

input double volume;
input double lot_multiplicator;
input int pips;
void OnTick()
  { double volume1=volume;
if(OrdersTotal()==0)
OrderSend(NULL,OP_SELL,volume,Bid,5,0,0);}


void send_order_buy()
{
 double volume1=volume1*lot_multiplicator;
OrderSend(NULL,OP_SELL,volume,Ask,5,0,0);}

void send_order_sell()
{
 double volume1=volume1*lot_multiplicator;
OrderSend(NULL,OP_SELL,volume,Ask,5,0,0);}
 
Theodor Girtan:

Hi guys,i'm looking into making a simple martingale ea but i think i encountered a dead end.

So,the function send_order buy/sell should do the thing it intends to do.I appeal and  it should open a new sell/buy order with the volume increased by the lot_multiplicator but it says "'volume1' - undeclared identifier"

Also,if someone could enlighten me please,what is  the code that after a certain number of pips, a new market order would occur.(this is the biggest issue).




https://www.mql5.com/en/forum/129933

Need help on paulo_Costa Hedge EA
Need help on paulo_Costa Hedge EA
  • 2010.11.12
  • www.mql5.com
Hi,  I have used Paulo Costa Hedge EA for past few week and it make a some profit using this EA...
 
Theodor Girtan: ,i'm looking into making a simple martingale ea 

Martingale, guaranteed to blow your account eventually. If it's not profitable without, it is definitely not profitable with.
          Martingale vs. Non Martingale (Simplified RoR vs Profit and the Illusions) - MQL5 programming forum 2015.02.11

Why it won't work:
          Calculate Loss from Lot Pips - MQL5 programming forum 2017.07.11
          THIS Trading Strategy is a LIE... I took 100,000 TRADES with the Martingale Strategy - YouTube

 
Theodor Girtan:

Hi guys,i'm looking into making a simple martingale ea but i think i encountered a dead end.

So,the function send_order buy/sell should do the thing it intends to do.I appeal and  it should open a new sell/buy order with the volume increased by the lot_multiplicator but it says "'volume1' - undeclared identifier"


"'volume1' - undeclared identifier"

This is because you use a #property strict

You have to declare volume1 at a global level

 double volume1 =0.0;

void send_order_buy()
{
 volume1=volume1*lot_multiplicator;
OrderSend(NULL,OP_SELL,volume,Ask,5,0,0);}
Reason: