Help to check the global variable code
Posted: Aug 11 2012
In Instrument A(part of codes):
In Instrument B:
With the code, I cant get any singal in Instrument B, but In Instrument A I have singals.
So, what's wrong with it.
The other quesiton is :
About global variable,how can I get more document to let me understand it and use it?
Sincerely
Code: Select all
Num_GV_1 = GVSetInteger(1,1) ;
Num_GV_2 = GVSetInteger(2,1) ;
Num_GV_3 = GVSetInteger(3,1) ;
Num_GV_4 = GVSetInteger(4,1) ;
Num_GV_Shares = GVSetNamedFloat(" SHARES OF INSTRUMENT B", Num_Shares_B ) ;
Code: Select all
Num_GV_1 = GVGetInteger(1) ;
Num_GV_2 = GVGetInteger(2);
Num_GV_3 = GVGetInteger(3);
Num_GV_4 = GVGetInteger(4);
Num_Shares_B = GVGetNamedFloat(" SHARES OF INSTRUMENT B", -999.99);
//*****************************************************************************
if Num_GV_1 = 1 then buy Num_Shares_B contracts this bar at close ;
if Num_GV_2 = 1 then buytocover this bar at close ;
if Num_GV_3 = 1 then sellshort Num_Shares_B contracts this bar at close ;
if Num_GV_4 = 1 then sell this bar at close ;
//*****************************************************************************
Value1 = Ticks ; { force RadarScreen to update every tick }
//*********************************************************
So, what's wrong with it.
The other quesiton is :
About global variable,how can I get more document to let me understand it and use it?
Sincerely