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

Re: adding symbol name to print text to file



PureBytes Links

Trading Reference Links

Hello Doug,

While in a Workspace containing 9 futures ,
        Ed,Es,Gc,Hg,Jy,Kc,Lh,Ng,and W I activate this signal and open
        and close each chart for the above symbols. As each chart is
        opened, a .csv file is created with Hi, Low, Close, OI ch and
        Volume.  Each chart is named Exp-ED.csv, Exp-Es.csv etc.
        Hope this helps .
        ----------------------------------------------------------------

                Input: Decimals(4) ;
        
                Vars:  EqName(""),TradeStr1(""),OICh(0),VolAdj(0),VarHigh(0),VarLow(0),VarClose(0),
                   VarDecimals(0);
                        
                Condition1=Date>ElDate(12,31,1996);
                VolAdj=Volume/1000;
                OICh=OpenInt[0]-OpenInt[1];

                If CurrentBar = 1 Then Begin
                        EqName = "\Documents and Settings\Administrator\My Documents\ss\CYCLES\EXP-" + LeftStr(GetSymbolName, 2)+ ".csv";
                        FileDelete(EqName);
                End;
        
                EqName = "\Documents and Settings\Administrator\My Documents\ss\CYCLES\Exp-" + LeftStr(GetSymbolName, 2) + ".csv";
                        
                If  LeftStr(GetSymbolName,2)="NG" then begin
                        VarHigh=H*10;
                        VarLow=L*10;
                        VarClose=C*10;
                        VarDecimals=2;
                end
                else begin
                VarHigh=H;
                        VarLow=L;
                        VarClose=C;
                        VarDecimals=Decimals;
            end;
                If  LeftStr(GetSymbolName,2)="WY" then begin
                        VarHigh=H*100;
                        VarLow=L*100;
                        VarClose=C*100;
                        VarDecimals=2;
                end;
                If LastBarOnChart then begin
                        OICh = 0;
                    VolAdj= 0;
                End;
        
                TradeStr1 = ELDateToString(Date) + "," + NumToStr(VarHigh, VarDecimals) +"," +  
                          NumToStr(VarLow, VarDecimals) + "," + NumToStr(VarClose, VarDecimals) + "," + 
                      NumToStr(VolAdj,2) + "," + NumToStr(OICh,0) +"," +NewLine;  
  


Best regards,
 Grover  
                        mailto:grover@xxxxxxxxxxxx