I use the code below:
I can get the daily ADX corrcet value.
Could you give me some suggestions?
Thank you.
variables:
var0( 0 ) , var1(0) , var2(0) , TradeSignal(0) , PosSize(0) , ADXNUM(0,data2);
var0 = BollingerBand( BollingerPrice, Length, -NumDevsDn ) ;
var1 = BollingerBand( BollingerPrice, Length, 0 ) ;
var2 = BollingerBand( BollingerPrice, Length, NumDevsDn ) ;
condition1 = CurrentBar > 1 and TestPriceLBand crosses over var0 and ADX(15) of data2 < ADXNUM;
condition2 = CurrentBar > 1 and (TestPriceLBand crosses under var1);
condition3 = CurrentBar > 1 and TestPriceLBand crosses under var2 and ADX(15) of data2 < ADXNUM;
condition4 = CurrentBar > 1 and (TestPriceLBand crosses over var1 );
How to get daily ADX value on 20mins time frame?(MC8.8)
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
What kind of suggestion you are looking for?I use the code below:
I can get the daily ADX corrcet value.
Could you give me some suggestions?
Thank you.
variables:
var0( 0 ) , var1(0) , var2(0) , TradeSignal(0) , PosSize(0) , ADXNUM(0,data2);
var0 = BollingerBand( BollingerPrice, Length, -NumDevsDn ) ;
var1 = BollingerBand( BollingerPrice, Length, 0 ) ;
var2 = BollingerBand( BollingerPrice, Length, NumDevsDn ) ;
condition1 = CurrentBar > 1 and TestPriceLBand crosses over var0 and ADX(15) of data2 < ADXNUM;
condition2 = CurrentBar > 1 and (TestPriceLBand crosses under var1);
condition3 = CurrentBar > 1 and TestPriceLBand crosses under var2 and ADX(15) of data2 < ADXNUM;
condition4 = CurrentBar > 1 and (TestPriceLBand crosses over var1 );
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
-
- Posts: 4
- Joined: Dec 27 2013
- Has thanked: 2 times
Sorry for that.
I am the newbie.
I can't get the correct daily value of ADX on 20 mins time frame.
I try the Global Variables,but it seems that it only plot the last value.
set:
get:
Could the Global Variables can be used in optimizing?
Or I should use ADE to do that?
Or it can be done using data2?
Thank you.
I am the newbie.
I can't get the correct daily value of ADX on 20 mins time frame.
I try the Global Variables,but it seems that it only plot the last value.
set:
Code: Select all
GVSetNamedDouble("Box",ADX(30));
Code: Select all
var0 = GVGetNamedDouble("Box",0);
// Plot them
Plot1(var0 , "ADX");
Or I should use ADE to do that?
Or it can be done using data2?
Thank you.
Code: Select all
variables:
var0( 0 ) , var1(0) , var2(0) , TradeSignal(0) , PosSize(0) , ADXNUM(0,data2);
var0 = BollingerBand( BollingerPrice, Length, -NumDevsDn ) ;
var1 = BollingerBand( BollingerPrice, Length, 0 ) ;
var2 = BollingerBand( BollingerPrice, Length, NumDevsDn ) ;
condition1 = CurrentBar > 1 and TestPriceLBand crosses over var0 and ADX(15) of data2 < ADXNUM;
condition2 = CurrentBar > 1 and (TestPriceLBand crosses under var1);
condition3 = CurrentBar > 1 and TestPriceLBand crosses under var2 and ADX(15) of data2 < ADXNUM;
condition4 = CurrentBar > 1 and (TestPriceLBand crosses over var1 );
- TJ
- Posts: 7775
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2233 times
Do you mean you want to have multi-data analysis?Sorry for that.
I am the newbie.
I can't get the correct daily value of ADX on 20 mins time frame.
::
What is your main chart resolution?
You can start here:
post #4 and post #5
viewtopic.php?f=16&t=6929