How do I call value from a function
Tony Chavez:
Put tge function name with its parameters in the OnTick()void tick{
//How would I get WantedValue to test against
if(CurrentAsk < PreviousAsk+0.051){
OrderSend(XXXXXX);
}
}
//////////////My Functions
double My_Function(double WantedValue){
WantedValue = 0.051;
return (WantedValue);
}
That's all
In your case you can even call it by a condition:
if(My_Function(Close[0])>0.1) return;
void tick{
//How would I get WantedValue to test against
if(CurrentAsk < PreviousAsk+WantedValue){
OrderSend(XXXXXX);
}
}
//////////////My Functions
double My_Function(double WantedValue){
WantedValue = 0.051;
return (WantedValue);
}