Orders Trigger Over SMA?
-
iiiiiiiii
-
@zereleth said in Orders Trigger Over SMA?:
"I’ve also modified it a little bit, by inserting a 21 MA on the chart, and only put the buy if price closed above the 21MA, and sell stop order if price closed below 21 MA line"
If this is what you're trying to do, then doesn't that mean that only one pending order should be placed?
-
@q8carpenter I took it as that both pending orders are placed but lets say if the buy pending is crossed it does a check to see if its above the SMA before going through with it, if its not then it just doesnt trade on that day
-
I strongly recommend you to work on candle ID 1 in all your 'Condition' blocks. That will remove a lot of messy results.
-
@l-andorrà I have changed the candles ID to 1, currently tried to implement what I described and came up with this however it's very messy and I have no way of testing if it works since it goes over the 10 block limit (and i cant afford premium rn)

Also as you can see if we use a bullish example it places the pending orders as normal but if the SMA is below average then it will trigger block 15 and close the trades, ideally I could rewrite this in a better way so it doesn't open the trade at all and I don't have to pay spread but I can't figure out how. Also another issue is trying to fit this into a 10 block limit but that might just not be possible
Any thoughts?
-
You can split up your ptroject into smaller subprojects to test them on your MT4 if you are a free user. However, I recommend you to pay for a monthly subscription. You'll be able to test everything you need.