How to code? - page 172

 

quick question on opening orders

Want to open 2 orders ONLY when within a specific number of bars after an MA cross.

I have NOT found the best way to code this without getting Additional orders opened that I don't want.

The MA cross happens and 2 orders get opened within X number of bars..after 2 orders open then NO more orders in that same direction. MA cross opposite direction then same deal.

Any Tips or information on how best to code it?

any EA's i might look at for example?

THANKS

 

change of color

Hello,

I based my question in this file because I think it will be in a better place.

After pusieus trial without results, I would like to change this indicator to get a color change with the change of trend.

if trend is positive then couleur1

if trend is negative then couleur2

Thank you in advance for your help

Files:
 

My stochastic EA needs fixing if fixed will make tons of cash

I have a Basic Stochastic Level Expert from IBFX. The way I use it is I determine the direction of trend on the 4h chart with trendlines and other standard methods. I then put my stochastic expert on the 1m chart and choose only long or only short on the common tab. It sells over 80 and buys under 20 (depending on if your allowing it to go long or short) I then watch it make money until I determine the H4 movement may end. I do this with no stoploss, very small lots, and a takeprofit of 5 -10 depending. The only problem I'm having is the EA closes trades for no reason, I set stoploss to 0, trailing to 0 and still it decides to close trades and I just don't get it. I would've made so much bank with thing if it didn't have a mind of it's own! (or at least less of a mind) so if anyone can make the thing not close trades unless a TP or a SL are hit, it would be beneficial to everyone. Now I just need to figure out how to upload it on here.

 

Hi, the ea closes an trade if an new signal is giving in the opposite direction. I've added an option in the ea ,bCloseIfNewSignal, to turn this off or on, default now is off(false)

 

Need help in cross alert

Hii

I am trying to get things coded which is..

I have two EMA and .. when they cross I need an alert..

but.. problem is i don't need an alert when the cross and bar close.. I need alert when they CROSS only.. but problem with this is..

when the 5m bar is forming.. it can cross and recross and cross again..

I need to filter those recross..

for example if on current bar it first cross pop up and alert ( say buy ) and then when the price move it can recross and cross back up ( i need to ignore these cross uncross thing ) unless it cross from the top as a sell signal...

Can anyone help me out with this..

EMA is 5 and 20

thanks

 

Use as valid cross only cross on previous bar.

 
bobfourie:
Hi, the ea closes an trade if an new signal is giving in the opposite direction. I've added an option in the ea ,bCloseIfNewSignal, to turn this off or on, default now is off(false)

That was awesome it works great now! Here's a question if I may push my luck . . . is there any way to give it a price target set into the EA in which when it hits that price it will close all trades and shut down not allowing any more trades? for example, if eur/usd is at 1.3238 and I feel it's going to get to 1.3356 safely but I'm going to bed. So at the time it hits that 1.3356 it basically closes its trades turns itself off and doesnt do anything until I reset it?

To tell you the truth I also have an idea for a fully automated version If you'd like to hear it but I don't want to overstay my welcome.

 

Hey bob I really appreciate your help with the ea, actually it seems like now instead of closing the order, it just doesnt open any new ones, is there any way to allow it to open new orders while it already has a trade/trades running?

 

I have added an option for you to put the price in and to allow only longs or short, you must use this setting instead of setting mt to only allow long or shorts. If the price are reached, the ea will close all orders and stop sending new orders. Just restart it to get it going again the next day after your nap. Just set it to 0 if you don't want to use it

Hey bob I really appreciate your help with the ea, actually it seems like now instead of closing the order, it just doesn't open any new ones, is there any way to allow it to open new orders while it already has a trade/trades running?

Its original ea only allows one order at one time. I've added an option for you bOpenMultiOrdersSignal, true as default, it will now open every time an signal is giving.

I've got time on my hands, so will code an ea for you

 
bobfourie:
I have added an option for you to put the price in and to allow only longs or short, you must use this setting instead of setting mt to only allow long or shorts. If the price are reached, the ea will close all orders and stop sending new orders. Just restart it to get it going again the next day after your nap. Just set it to 0 if you don't want to use it

Its original ea only allows one order at one time. I've added an option for you bOpenMultiOrdersSignal, true as default, it will now open every time an signal is giving.

I've got time on my hands, so will code an ea for you

Bob, I really don't know what to say. Seriously I'm not just kissing @$$, it's really extremely nice of you to help out with my EA efforts, I feel like I owe you. Most people would say "yeah I'll help ya, but what do I get"

The system I'm working on is low pips but high probability, it uses a DSS Bressert oscillator and heiken ashi smooth on the H4 to determine direction and the stochastic you fixed to scalp along the way. I'm also considering Ideas to use the 15m stoch to "turn it on and off" if you will. Keep in mind this isn't the intructions for building the ea I'm just letting you know the idea of it. From backtesting it will take a day or 2 off (not trading) at a time but the days it works I don't see it having a loss yet (but I'm sure I just Jinxed that) I've been spending an hour or so a day backtesting my indicators and I don't wanna jump the gun but so far it looks possible to make a very nice system.

Are you able to code an EA that takes multiple timeframes into consideration?

Sorry if my message is jumbled and barely understandable, I've got a female on the way and a dirty apartment so I'm in a hurry. Again thanks, really

Reason: