torexvir:
Just set Up & Down variables as global ?
I am struggling to generate a switch using booleans.
Essentially
if(UPTREND)
{
Up=true
Down=false
}
if(DOWNTREND)
{
Down=true
Up=false
}
So when market UPTRENDED based on criteria Up=true Down=false
This would only change when DOWNTREND criteria were met and so on.
Currently i seem to be only able to activate it for the individual candle the criteria is met on and then both UPTREND and DOWNTREND are reset to false. I need the true boolean to remain true until the opposite one is switched to true.
Hopefully this makes sense. Thanks for the pointers :)

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I am struggling to generate a switch using booleans.
Essentially
if(UPTREND)
{
Up=true
Down=false
}
if(DOWNTREND)
{
Down=true
Up=false
}
So when market UPTRENDED based on criteria Up=true Down=false
This would only change when DOWNTREND criteria were met and so on.
Currently i seem to be only able to activate it for the individual candle the criteria is met on and then both UPTREND and DOWNTREND are reset to false. I need the true boolean to remain true until the opposite one is switched to true.
Hopefully this makes sense. Thanks for the pointers :)