Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.
-
Content Count
81 -
Joined
-
Last visited
Posts posted by zapisy
-
-
-
To find SR you can use something like this:
vars: Support (0), Resistance (0); Resistance = highest(H,Length)[1]; Support = lowest(l,Length)[1]; if Resistance<>Resistance[1] then Resistance = highest(h,Length)[1]; if Resistance=Resistance[1] then Resistance = Resistance[1]; If Support<>Support[1] then Support = lowest(l,Length)[1]; if Support=Support[1] then Support = Support[1];
-
Tto find support and resistance, you can use someting like that:
vars: Support (0), Resistance (0); Resistance = highest(H,Length)[1]; Support = lowest(l,Length)[1]; if Resistance<>Resistance[1] then Resistance = highest(h,Length)[1]; if Resistance=Resistance[1] then Resistance = Resistance[1]; If Support<>Support[1] then Support = lowest(l,Length)[1]; if Support=Support[1] then Support = Support[1];
-
You can use the support and resistance as first exit.
Second exit you can make by taking w. average range for 100 days and multiple it by 1.5 or something like that if the stop is too small, and profit target multiply by 5. This way, the stop and profit will adopt to the changing market.
-
Any optimization is a curve fitting, if is done without forward testing.
Never base your profit target on fixed amount, because the bars range change every day, every month and every year - they are different in size.
By optimizing, you are trying to find best values, but those values may be on the edge of the bars, so simply speaking, is better to be out, than miss big profits,
when last bar range were big enough to take $1500 instead of $500.
You can add a condition, that if the possible profit factor is less than your stop * 2, then do not take the trade.
Luk
Code ATR Ratchet in EasyLanguage
in Automated Trading
Posted
You are very welcome