And it works great (how could I live without it ...) !
The problem is that my indic does NOT refresh AUTOMATICALLY when I change an input value in my strat.
In fact, I have to switch off/on the indic for it to refresh properly.
Is there any way to have the indic update automatically from a change in my strat ?
Here's excerpts of EL code from my strat and my indic :
Code: Select all
1- STRAT
// init Global_Variables
value1=GVSetNamedDouble("EMA_Fast_UT1", EMA_Fast_UT1);
value1=GVSetNamedDouble("EMA_Med_UT1",EMA_Med_UT1);
value1=GVSetNamedDouble("EMA_Slow_UT1",EMA_Slow_UT1);
2- INDIC
inputs:
Price( Close ),
Displace( 0 ) ;
variables:
var0( 0 ),
var1( 0 ),
var2( 0 );
value1=GVGetNamedDouble("EMA_Fast_UT1",value4);
value2=GVGetNamedDouble("EMA_Med_UT1",value4);
value3=GVGetNamedDouble("EMA_Slow_UT1",value4);
var0 = XAverage( Price, value1);
var1 = XAverage( Price, value2);
var2 = XAverage( Price, value3);
condition1 = Displace >= 0 or CurrentBar > AbsValue( Displace ) ;
if condition1 then
begin
Plot1[Displace]( var0, "FastAvg" ) ;
Plot2[Displace]( var1, "MedAvg" ) ;
Plot3[Displace]( var2, "SlowAvg" ) ;
end;
Yann