[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Print statement for TradeBullet Order Automation



PureBytes Links

Trading Reference Links

Hi Don,

Basically the problem seems to be a mix of numeric and string - the
print command is looking for string.

TradeBullet has this example:

if condition1 then
print (file("C:\TradeBullet\order1.tb"), 
  "place,Simulator,MSFT,ISLAND,BUY,1000,stoplimit," 
  + numtostr(mvarBuyStop,2) + "," 
  + numtostr(mvarBuyStop +1.75) +",day,,,System1");

They say that this works - however there is a problem with it. It looks
like they forgot a coma is needed in (mvarBuyStop +1.75) to make it
(mvarBuyStop +1.75,2).  The ",2" tells how many decimal places to retain
in the string.

With that change the following file was produced with mvarBuyStop = 10.
File name and location were correct.

place,Simulator,MSFT,ISLAND,BUY,1000,stoplimit,10.00,11.75,day,,,System1

Larry

Donald Beck wrote:
> 
> Hello Group.
> 
> Struggling to get my head around this.
> 
> I am trying to write a print command in EL that can
> send the file to TradeBullet. Nothing happens.
> 
> Any help appreciated!!
> 
> So far I have....
> 
> If LastBarOnChart then begin;
> If close >= DonMid(DonHigh,Buy2) + VALUE1 points then
> begin;
> print (file("D:\Tradebullet\order1.tb"),
> "PLACE,33106644,EUR/USD,DEFAULT,BUY,10000,MARKET,0,0,GTC,,");
> end;
> 
> The strategy in EL is...
> BEGIN
> VALUE1=BUY1;
> BUY("Buy") at DonMid(DonHigh,Buy2) + VALUE1 points
> stop;
> End;