Struggling with GV code - page 2

 
kminler:

I must have taken the print statement out when I cleaned up the Ha, I had a lot of other stuff in there I was testing.

I'm afraid that I don't understand "doesn't write to Global Variable either" I thought GlobalVariableGet saved the value into the GV and which would then be wrote to "currenthaLow"?

Not too sure that I follow your last line, I have the HA indicator runing on the Aussie 15 min, I attach GVTESTER to the AUDJPY, it is my expectation that

with each tick the value of haLow is recalculated by Ha and GVTESTER will get the new value.

This is indeed what happens when I run HA with the three lines inserted, however; for the life of me I cannot get the value to GVTESTER on the AUDJPY chart.

OK, I see the confusion now . . .

GVTESTER has a variable called haLow

Your HA Indicator has a variable called haLow

These variables have no connection with each other . . . they are called the same name but they are totally separate entities. You need to add the Global Variable code into the HA Indicator . . .

 

OK finally got it, inserted the GV code into Ha and then deleted "GlobalVariableSet("TGV_gethaLow", haLow);" from GVTESTER,

so then GlobalVariableGet worked correctly.

Many, many thanks!!!

 
kminler:

OK finally got it, inserted the GV code into Ha and then deleted "GlobalVariableSet("TGV_gethaLow", haLow);" from GVTESTER,

so then GlobalVariableGet worked correctly.

Many, many thanks!!!

You are welcome . . .
Reason: