I don’t know why for me refresh a correct value from a global variable declared in a signal as a “GVSetNamedDouble” to read the correct value inside Money Management signal as a “GVGetNamedDouble” I need to change the name of “Set” for another name to works.
My procedure to happen the update :
Signal “A” : Signal Buy :
Signal “B” Management Money : “Portifolio Controle Risco 3”:GV_Status_Dinheiro[1,0]= GVSetNamedDouble( GetSymbolName+"PCR_Close", Close ) ;
GV_Status_Dinheiro[2,0]= GVSetNamedDouble( GetSymbolName+"PCR_Hilo_Trailing_Stops", Hilo_Trailing_Stops ) ;
Code: Select all
for idx = 0 to portfolioStrategies-1 begin
GV_Status_Dinheiro[1,idx]=GVGetNamedDouble(Name_Bovespa_Array_Sorted[idx]+"PCR_Close",99);
GV_Status_Dinheiro[2,idx]=GVGetNamedDouble(Name_Bovespa_Array_Sorted[idx]+"PCR_Hilo_Trailing_Stops",99);
end;
2-change GV names in Signal “A”
GetSymbolName+"PCR_Close to PCR_NEW_Close
And PCR_Hilo_Trailing_Stops to PCR_NEW_Hilo_Trailing_Stops.
3-compile signal“A” again and run inside Portfolio Trader a new backtesting
After that all GV values inside signal“A” are correct in signal ”B” Money Management
Do you how to make this works without this procedure ? It look like the value only go to other side after we turn off the connection names between signals
There is any limitation to use GV between signals in backtesting procedure?