Thread: How to code?
View Single Post
  #1015 (permalink)  
Old 06-10-2008, 07:00 PM
payback payback is offline
Member
 
Join Date: May 2008
Posts: 31
payback is on a distinguished road
ok ok ok!
here is more!
PHP Code:
double
         BuyValueCurrent
,
         
SellValuePrevious,
         
SellValueCurrent,
         
         
BuyValuePrevious2,
         
BuyValueCurrent2,
         
SellValuePrevious2,
         
SellValueCurrent2,
         
BuyValueCurrent1min,
         
BuyValueCurrent5min,
         
BuyValueCurrent21min,
         
BuyValueCurrent25min,
         
SellValueCurrent1min,
         
SellValueCurrent5min,
         
SellValueCurrent21min,
         
SellValueCurrent25min,
         
         
TrendEnvUp,
         
TrendEnvDown,
         
TrendEnvUp1min,
         
TrendEnvUp5min,
         
TrendEnvDown1min,
         
TrendEnvDown5min,
         
        
Compra,
         
Vendi,
         
StopLong,
         
StopSell

the icustom funcions and buy sell

PHP Code:

 BuyValuePrevious  
iCustom(NULL,TimeFrame,IndicatorName1,NumBars,0,2);
   
BuyValueCurrent iCustom(NULL,0,IndicatorName1,NumBars,1,0);  
   
   
BuyValuePrevious2  iCustom(NULL,TimeFrame,IndicatorName2,NumBars,0,2);  
   
BuyValueCurrent2 iCustom(NULL,0,IndicatorName2,NumBars,0,0);  
   
   
SellValuePrevious iCustom(NULL,TimeFrame,IndicatorName1,NumBars,1,2);
   
SellValueCurrent  iCustom(NULL,0,IndicatorName1,NumBars,0,0);
   
   
SellValuePrevious2 iCustom(NULL,TimeFrame,IndicatorName1,NumBars,1,2);  
   
SellValueCurrent2 iCustom(NULL,0,IndicatorName2,NumBars,1,0);  
   
   
BuyValueCurrent1min iCustom(NULL,1,IndicatorName1,NumBars,1,0);
   
BuyValueCurrent5min iCustom(NULL,5,IndicatorName1,NumBars,1,0);
   
BuyValueCurrent21min iCustom(NULL,1,IndicatorName2,NumBars,0,0);
   
BuyValueCurrent25min iCustom(NULL,5,IndicatorName2,NumBars,0,0);
   
SellValueCurrent1min  iCustom(NULL,1,IndicatorName1,NumBars,0,0);
   
SellValueCurrent5min  iCustom(NULL,5,IndicatorName1,NumBars,0,0);
   
SellValueCurrent21min iCustom(NULL,1,IndicatorName2,NumBars,1,0);
   
SellValueCurrent25min iCustom(NULL,5,IndicatorName2,NumBars,1,0);
   
   
   
   
TrendEnvUp         iCustom(NULL,0,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,0,0); // trendenvelopes 
   
TrendEnvDown         iCustom(NULL,0,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,1,0); // trendenvelopes 
   
TrendEnvUp1min         iCustom(NULL,1,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,0,0);
   
TrendEnvUp5min         iCustom(NULL,5,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,0,0);
   
TrendEnvDown1min         iCustom(NULL,1,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,1,0);
   
TrendEnvDown5min         iCustom(NULL,5,IndicatorName4,Ma_Period,Ma_Shift,Ma_Method,Applied_Price,Deviation,1,0);
   
   
   
   
BuyCondition    = (BuyValueCurrent !=&& BuyValueCurrent2 !=&& TrendEnvUp != EMPTY_VALUE)&& (BuyValueCurrent1min !=&& BuyValueCurrent21min !=&& TrendEnvUp1min != EMPTY_VALUE) && (BuyValueCurrent5min !=&& BuyValueCurrent25min !=&& TrendEnvUp5min != EMPTY_VALUE) ;
   
SellCondition     = (SellValueCurrent !=&& SellValueCurrent2 !=&& TrendEnvDown != EMPTY_VALUE)&& (SellValueCurrent1min != && SellValueCurrent21min != && TrendEnvDown1min != EMPTY_VALUE)&& (SellValueCurrent5min != && SellValueCurrent25min != && TrendEnvDown5min != EMPTY_VALUE) ;
   
StopLong  = ((SellValueCurrent !=&& SellValueCurrent2 !=0) || (TrendEnvDown != EMPTY_VALUE));
   
StopSell  = ((BuyValueCurrent !=&& BuyValueCurrent2 !=0) || (TrendEnvUp != EMPTY_VALUE)); 
the exit condition

PHP Code:


StopBuy  
= (SellValueCurrent !=&& SellValueCurrent2 !=|| TrendEnvDown != EMPTY_VALUE);
StopSell  = (BuyValueCurrent !=&& BuyValueCurrent2 !=|| TrendEnvUp != EMPTY_VALUE); 

Last edited by payback; 06-10-2008 at 07:03 PM.
Reply With Quote