Hello hope you can assist
Hi all I am trying something out on the bob scalper technique. I am trying to put together and ea I have two current issues
1) I Wish to stop the ea to get a pair if the stoploss is hit
I'm setting the stoploss to the Daily Pivot (variable - DP), I have the DP value set in International Varibles and am pulling this value to the ea fine (I display it on the chart via display message) but utilizing this code does not Appear to function to set the stop loss when a transaction is triggered
'double stop = NormalizeDouble(DP,Digits);
bool result = SendSingleTrade(OP_BUY, TradeComment, Lot, Ask, cease, take);
Trade has been sent but with sl 00000'
2) I have again a variable vsacode that I pulldown from globalvariables the number is either a number between 0-8, 9-22 or a no sign value 2147483647
I am trying to us a simple if statement to provide sign (signal1) for the ea
code is
double vsacode=GlobalVariableGet(Symbol() vsacode);
int signal1;
if (vsacode lt; 9)signal1 = 1;
if (vsacode gt;8)signal1 =2;
if (vsacode gt;30)signal1=vsacode;
Again for affirmation I am showing the value in the chart value vsacode and signal 1
What I get is vsacode values correct ie either a number from 0-8, 9-22 or 2147483647
but the sign 1 value is either 0 or 2147483647
Help please