Don't think I can use constants because these parameters (inp15_Lo_MAperiod and inp15_Ro_MAperiod) are set by the user so I have no way of knowing what they might be before the EA is running. So I need to check their values during runtime.
I can't figure out how to use variables because I can't figure out how to assign the values from the inputs (or how to check the inputs).
Here is a sample logic if it will help.
Entry conditions (here for a sell):
main_trend--> if ema 5 < ema 8
secondary condition--> if ema 8 < ema 13
final entry condition--> if ema 13 < ema 62
(Here I need--> if ema 62 < ema 100 then go ahead and open the trade, but the ema values are set as input parameters which may be something other than 62 and 100, that's what I need to check is what those input parameters are)
Sell Now
But I have an "emergency exit" check, once in a trade, that is--> if ema 62 > ema 100 then exit (short) trade.
What is happening is my entry conditions are met and the trade is opened but the emergency exit conditions are also met so the trade closes immediately (costing me the spread each time).
So, just before my sell order executes I need to make sure my emergency exit condition (set in inputs) is in a state to allow the trade to open.
Make sense?