Magic Number question (trying to learn coding)
Posted: Mon Oct 05, 2020 9:31 am
Hi everyone,
I'm trying to understand how to use Magic Numbers to separate my trades. I scalp as well as have trend trades open with different Stop Loss and Take Profit settings and different indicators.
The current EA I have sets the Stop Loss for every chart I open regardless of the time frame. Of course this doesn't work for me as a 10 pip Stop Loss on a D1 chart is useless.
I'm trying to understand how to use Magic Numbers so I can both scalp and trend trade at the same time.
If I understand it correctly, this is an example of how I would do it:
Set my scalping EA on the M5 EUR/USD chart with a Stop Loss of 10. Magic Number = 11.
Set my trend EA on the D1 EUR/USD chart with a Stop Loss of 150. Magic Number = 99.
Questions:
1) Is this example correct?
2) The EA's will not interfere with each other, right? For example, the scalp EA won't change my Stop Loss on the trend chart or vice versa.
3) If I want to trade another pair (say AUD/NZD), would I put the EA I want (scalp or trade) on the AUD/NZD chart and assign a different Magic Number?
i.e. Scalp EA on AUD/NZD = 12, Trend EA = 98
OR
Could I keep the same Magic Number?
In which case the scalp EA will set my Stop Loss to 10 on every chart it is on and the trend EA will set my Stop Loss to 150 on every chart it is on.
That means the appropriate EA would have to be put on every chart I open.
Is this correct?
TIA for your help understanding this stuff.
I'm trying to understand how to use Magic Numbers to separate my trades. I scalp as well as have trend trades open with different Stop Loss and Take Profit settings and different indicators.
The current EA I have sets the Stop Loss for every chart I open regardless of the time frame. Of course this doesn't work for me as a 10 pip Stop Loss on a D1 chart is useless.
I'm trying to understand how to use Magic Numbers so I can both scalp and trend trade at the same time.
If I understand it correctly, this is an example of how I would do it:
Set my scalping EA on the M5 EUR/USD chart with a Stop Loss of 10. Magic Number = 11.
Set my trend EA on the D1 EUR/USD chart with a Stop Loss of 150. Magic Number = 99.
Questions:
1) Is this example correct?
2) The EA's will not interfere with each other, right? For example, the scalp EA won't change my Stop Loss on the trend chart or vice versa.
3) If I want to trade another pair (say AUD/NZD), would I put the EA I want (scalp or trade) on the AUD/NZD chart and assign a different Magic Number?
i.e. Scalp EA on AUD/NZD = 12, Trend EA = 98
OR
Could I keep the same Magic Number?
In which case the scalp EA will set my Stop Loss to 10 on every chart it is on and the trend EA will set my Stop Loss to 150 on every chart it is on.
That means the appropriate EA would have to be put on every chart I open.
Is this correct?
TIA for your help understanding this stuff.