Reply

PAR and AWO Indicator :(

21 replies

Loz

Subscriber, bbp_participant, community, 59 replies.

Visit profile

10 years ago #111935

My trades are opening at wrong times, and when they do open, they keep opening new ones after the first one has been closed 🙁 I didnt want it to do that.

 

How do I get the PAR to look at the CLOSE of the candle. ie, the last PAR dot, if on next bar candle closes below the PAR dot, go short… BUT, to check the AWO indicator to see where the bars are at… I need to differentiate the two colors and whether or not its above 0 (the vertical scale) or below it.  and vise versa…

 

How do i do that on this software?

 

cheers

 

Loz

0

jimasks

Customer, bbp_participant, community, 45 replies.

Visit profile

10 years ago #123760

I will try to address your last two comments and then add what I found out about EA Wizard.

 

I will start with your second comment first.

   I didn’t understand how EA Wizard tries to manage a trade. I have now corrected the problem. So, it works. I still don’t know if it is what would like. Now I have it set so that it will start trailing the when it hits the first trail stop level. For example; Say it is set to start trailing at 10 pips in profit and it will trail by 5 pips. This implies to me it should not move the stop loss from the initial condition until it is in profit by 15 pips. Then when it moves it will move the SL to 10 pips in profit. 

 

I don’t know if this is what would like. 

 

Alternatively, we could (easily) build it so it set the stop loss initially to Break Even at some pip level and then to start trailing at a yet higher level. Example: Trade goes opens and goes to the first level of 15 pips, were the SL is set to break even. Then at a higher level, like 25 pips in profit, it starts trailing by 5 pips their after. Just an option.

 

What are the variables and what do the mean?

I think most of the parameters are self explaintory, like the OA and PSAR parameter, the trade parameters. 

The ones that may not be are;

TrailingSLAcitive : Switch to turn on or off the trailing stop feature (true = use trailing stop parameters)

SL_Trail_Start_ifActive ; If TrailingSLActive = true, then this value will be the profit level will become active. 

SL_Trail_ifActive: If TrailingSLActive = true, then this is the amount the stop is moved each time a new profit level is made.

 

Hope thats clearer. 

 

——–

Ok now for the surprises I found and an additional problem.

 

1. The trailing stop is set to be the way stocks are often trailed, that is once the trailing stop is activated, the stop loss is adjusted to a new level for each little movement higher in profit. Since I had not used the trailing stop before this was a surprise. In forex, the trailing stop is not adjusted into the trade goes into profit by the size of the trailing stop size, and with good reason.

Use the example of a trailing stop is activated at 15 pips in profit and by 5 pips.

For stock trailing stop would go as;

Profit Level ,Trail stop

15.0 pips, 5.0 pips

15.5pips, 5.5 pips

19.0 pips, 9.0 pips

21.0 pips, 11. pips

 

For Forex trailing stops it would look different;

15.0 pips, 5.0 pips

15.5pips, 5.0 pips

19.0 pips, 5.0 pips

21.0 pips, 10. pips

 

The Way SQ EA Wizard does thing is ok as long as one understands it.

However. I believe this will cause some real time errors. If trade adjustments are sent to often, the round trip time to the broker and the time it takes for the broker to make these adjustment are not small. If the adjustments are sent too often, the broker will issues some errors. This will surely happen in an active market…. I thinks this needs to be fixed and i will suggest it in an area of the forms.

 

2. only one long or short trailing stop can be managed at a time. So, if one were to have more than one buy trade, only the latest trade would be managed by a trailing stop. — This is a result of how the basic code is written. 

 

Now I think I have a way to overcome this to some degree. I could add an other two tabs and adjust do the management by using some of the internal code… I didn’t try this since this is a learning exercise and I am out of time for things today. If you are interested, I can give it a try. I expect this last point is a disappointment, but that’s a limitation of EA Wizard. 

 

——————-

 

I am including the new EA and an extra that was to help me understand how the trailing stop would work.

 

Jim

0

jimasks

Customer, bbp_participant, community, 45 replies.

Visit profile

10 years ago #123761

Opps. wrong button. Here is my little EA that helps me understand how the trailing stop works. I don’t think is will be of any use to anyone but me, but I expect someone might learn from it.

 

 

0

Loz

Subscriber, bbp_participant, community, 59 replies.

Visit profile

10 years ago #123766

Cheers Jim

 

I asked Mark not long ago about how the EA Wizard isn’t allowing us to control more than one trade in any direction; Mark says as long as there is a Magic number, it should be ok…

 

We have a Magic number for long and short, however, I’m not sure more than one trade; say a Long trade can be used with one magic number, it would appear from my understanding that we need a new magic number for each Long Trade that is open. Unless I’m mistaken.

 

BTW…

Do you have any methods to check whether or not we are at a support or resistance level:

 

you see, with the PAR system I’m using, if there is a element of support or resistance when a signal shows up, I determine before opening the trade if S/R is near, if its too close, I don’t take the trade on…

 

How would one implement that into this EA Wizard software?

 

I was thinking counting X Candle’s Close, and if they are within X pips of the trade market price to be opened at, then I ignore the trade… vise versa for shorts.

 

Cheers

 

Loz

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

10 years ago #123772

Hello Loz,

 

I checked your EA. The problem is that you increment MagicLong and MagicShort before every order.

These values should stay constant, otherwise the EA wouldn’t know which trades it should manage.

 

Otherwise it will keep on managing only the order with the very last magic number (the one whose vale is stored in MagicLong or MagicShort).

When you increment MagicLong, the old value is forgotten and the order management function will not find this old order.

 

EA can handle multiple orders independently, including trailing stops, but they should use unique and constant magic numbers.

If you want to open multiple orders at once you should use multiple trading rules (tabs).

 

 

Support/Resistance – there’s no simple way. It could work the way you described it – counting candle Close for some period back.

You’d have to make a custom function for that.

Mark
StrategyQuant architect

0

Loz

Subscriber, bbp_participant, community, 59 replies.

Visit profile

10 years ago #123809

I never put that EA together, Jim did… I have no idea how to fix it, along with 99% of other things. 🙁

 

K, but how / what ways are available to find support and resistance using your software is what Im asking. 😉

 

L

0

jimasks

Customer, bbp_participant, community, 45 replies.

Visit profile

10 years ago #123831

Ok, its now my turn to say that I am sorry for the long delay to reply. 

 

From the foregoing, I see that there could be a solution to managing trades when the magic number is incremented. So, I looked inside the EA generated code and saw the trade management is done with a simple calling statement and using the current magic number. So, I have used this to make an EA that will manage the multiple trades that could be in force at once and a copy of it is inclosed.

 

The multiple trade management is done by two new taps managelongs and manageshorts. In each tab, I change the magic number and then call the managing statement. This is brute forced solution and allows only the last 4 longs or short to be managed. One can be expand it easily, if more are needed. Just follow what was done in the two tabs.

 

Here is a little video of the longs working.

( http://screencast.com/t/LGdc5MphgyRB )

 

I feel that I am now tweaking this thing so much that I have forgotten what the original intent was. So, we may have to go back and see if the thing will work as you like. 

 

The entry engine is still unchanged; so, that should still work

The trade management for each trade should be as was originally wanted

Now the number of trade managed has been increased.

 

As far as getting automatic support and resistance lines draw; I think there a number of ways this could be done. I have had the best luck with ‘fractal’ indicator. This indicator is available on the MT4 as a built in indicator and is available with Strategy Quant. I would say you should bring up a chart and see how well it could give you the answers you would like. I expect it can be made it work. My guess is that is should not be too hard to make that work for us. 

 

The fractal indicator looks for a price extreme (highs or lows). if a high is found with two candles before and after a candle it marks it as a Fractal point. Similarly for the lows. This system works somewhat one would do by eye. If one uses this for different timeframes one can see that extremes can be found all over the place. 

 

Lets see if we could define some rules to make this work. After that, then if a signal is found near a support or resistance, it can be rejected with a little more code in the SQ.

 

Jim 

0

Viewing 6 replies - 16 through 21 (of 21 total)

1 2