help with scalper

 

this scalper buy and sell on test but on demo or real account it does nothing

is it because of

if (IsTesting())
Files:
jbscalpv1.mq4  11 kb
 

Yes

Change to

if (IsTesting() || IsDemo())

Which will then run forwards on a demo as well as backtest

Good Luck

-BB-

 
BarrowBoy:

Yes

Change to

Which will then run forwards on a demo as well as backtest

Good Luck

-BB-

barrowboy

thanks for your help you always helping us who are rookies

thanks for your patients

in this program when it buy or sell it will do the following

if i change the lots to 0.01 it will only trade twice

but if i leave it to .10 it will trade the 4x as specified

the reason i want to change it because it will on a mini account

buy .10 second .20 third .40 fourth .80 so if it go against it, it will loose all your money

so i am looking to change it to .01 .02 .04 .08

is that possible

 
delcor:

barrowboy

thanks for your help you always helping us who are rookies

thanks for your patients

in this program when it buy or sell it will do the following

if i change the lots to 0.01 it will only trade twice

but if i leave it to .10 it will trade the 4x as specified

the reason i want to change it because it will on a mini account

buy .10 second .20 third .40 fourth .80 so if it go against it, it will loose all your money

so i am looking to change it to .01 .02 .04 .08

is that possible






stoploss does not work

what did i miss

i have added

extern int StopLoss = 20;

and

if (OrderOpenPrice() - Ask >= (TrailingStop + Pips) * Point)
 

> stoploss does not work

double   var_100 = 0;

double   stoploss = 0;

In the code posted, both these externs have to be 20 to achieve a StopLoss on the order of 20..!

-BB-

 
BarrowBoy:

> stoploss does not work

In the code posted, both these externs have to be 20 to achieve a StopLoss on the order of 20..!

-BB-

is there not a system that will run this code line for line and display the out put of it

line for line. when we did programming in dbase it has a command that can run the program line for line

and show you what it will do with every input or program line and arguments

mql4 dont have that?