hi, I would have a problem with a code I’m trying to create. In my strategy I created a system with 4 major conditions, and 3 alternatives to the main condition, with 4 types of stop loss.
The code is as follows:
IF c1 AND c2 AND c3 c4 AND THEN
BUY 1 CONTRACT AT MARKET
STOP Ploss 30
ELSIF AND c5 c6 c7 AND THEN AND c4
BUY 1 CONTRACT AT MARKET
STOP Ploss 28
ELSIF AND c8 c9 c10 AND THEN AND c4
BUY 1 CONTRACT AT MARKET
STOP Ploss 24
ELSIF AND c11 c12 c13 AND THEN AND c4
BUY 1 CONTRACT AT MARKET
STOP Ploss 18
ELSE
ENDIF
the condition 4 would be an indicator equal for all.
I have created a main strategy with IF that comprises c1, c2, and c3 and c4, and 3 alternatives different from each other to the main one.
Now I want to ask if it is okay as it is set, or make a change?
in this way as it set the system takes into consideration only one such strategy c5, c6, c7, and c4 and stop Ploss 28 or takes them all together?
Hi, the suggestion for an answer is wrong. You must add AND C4 in/on(?) each ELSIF line, before THEN obviously.
If you’re a native English speaker as your flag suggests, you could thank me by telling me what is the correct expression: “in each line” or “on each line”? If you’re not, don’t bother :))
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue