Code: Select all
setstopposition;
setstoploss(50);
setstopshare;
setprofittarget(300);
thanks
Code: Select all
setstopposition;
setstoploss(50);
setstopshare;
setprofittarget(300);
convert everything to $hi all, i am writing setstoploss and setprofittarget function, i want the setstoploss function to be position basis, and the setprofittarget function on a share basis, therefore i use the code as follows
but the result is that stoploss and profittarget both become share basis, any method to do the job in my way?Code: Select all
setstopposition;
setstoploss(50);
setstopshare;
setprofittarget(300);
thanks
I misunderstood what you mean.hi TJ,
the value "50" and "300" is already means money, aiming at stop loss when have a loss of $50,
and take profit when the profit reach $300.
may you explain it in detail? thanks.
john
Your code does something else then you're trying to achieve, if I understand you correctly:the value "50" and "300" is already means money, aiming at stop loss when have a loss of $50,
and take profit when the profit reach $300.
Code: Select all
setstopposition;
setstoploss(50);
setstopshare;
setprofittarget(300);
Code: Select all
SetStopContract ;
SetStopLoss(50/CurrentContracts) ;
SetProfitTarget(300) ;