Martingale with "low" margin hit

Place your new trading idea here to see if someone can automate it.
Post Reply
User avatar
spyderman
Trader
Posts: 338
Joined: Sun Dec 11, 2011 1:39 pm

Re: Martingale with "low" margin hit

Post by spyderman »

So what's the trigger on this. Can I set it up to just initiate a trade in the direction and with the s/l, t/p that I want? Rather than be a trade management tool for another strategy (like inside bar, etc.) I would like to use this as the actual strategy.
Snaggin' some pips
DragosDanescu
Trader
Posts: 118
Joined: Wed Nov 16, 2011 5:18 pm
Location: Oradea, Western Romania

Re: Martingale with "low" margin hit

Post by DragosDanescu »

spyderman wrote:So what's the trigger on this. Can I set it up to just initiate a trade in the direction and with the s/l, t/p that I want? Rather than be a trade management tool for another strategy (like inside bar, etc.) I would like to use this as the actual strategy.
It's not a trade management tool, you need a trigger for any trade, right? You can use as trigger :
1.Inside/Outside bars;
2.Engulfing bars;
3.Time option (choose a specific hour - hours, not minutes, and EA will trigger trades for you at that specific time, on a daily basis.

Or, any other trigger that you wish.

P.S. Use last posted version, lotsize is solved.
Image
User avatar
spyderman
Trader
Posts: 338
Joined: Sun Dec 11, 2011 1:39 pm

Re: Martingale with "low" margin hit

Post by spyderman »

DragosDanescu wrote:
spyderman wrote:So what's the trigger on this. Can I set it up to just initiate a trade in the direction and with the s/l, t/p that I want? Rather than be a trade management tool for another strategy (like inside bar, etc.) I would like to use this as the actual strategy.
It's not a trade management tool, you need a trigger for any trade, right? You can use as trigger :
1.Inside/Outside bars;
2.Engulfing bars;
3.Time option (choose a specific hour - hours, not minutes, and EA will trigger trades for you at that specific time, on a daily basis.

Or, any other trigger that you wish.

P.S. Use last posted version, lotsize is solved.
Okay so if I want the ea to place a long order with a s/l of 25 and a t/p of 75 are these the correct settings. I have the inside bar selected to true, so does that place a trade as soon as that's broken or what?
Snaggin' some pips
DragosDanescu
Trader
Posts: 118
Joined: Wed Nov 16, 2011 5:18 pm
Location: Oradea, Western Romania

Re: Martingale with "low" margin hit

Post by DragosDanescu »

spyderman wrote:
DragosDanescu wrote:
spyderman wrote:So what's the trigger on this. Can I set it up to just initiate a trade in the direction and with the s/l, t/p that I want? Rather than be a trade management tool for another strategy (like inside bar, etc.) I would like to use this as the actual strategy.
It's not a trade management tool, you need a trigger for any trade, right? You can use as trigger :
1.Inside/Outside bars;
2.Engulfing bars;
3.Time option (choose a specific hour - hours, not minutes, and EA will trigger trades for you at that specific time, on a daily basis.

Or, any other trigger that you wish.

P.S. Use last posted version, lotsize is solved.
Okay so if I want the ea to place a long order with a s/l of 25 and a t/p of 75 are these the correct settings. I have the inside bar selected to true, so does that place a trade as soon as that's broken or what?
Yes, you should use LevelsOffset 12.5, as soon as EA detects an inside or outside bar that qualifies, it will display found and launch pending orders. If not qualifying, it will display none, but will show the last detected range that doesn't qualify.
Image
User avatar
spyderman
Trader
Posts: 338
Joined: Sun Dec 11, 2011 1:39 pm

Re: Martingale with "low" margin hit

Post by spyderman »

Hey DD,

I've got the EA running and have a couple of trades open. One that closed is an Aud/Usd trade. The first two trades hit s/l and the subsequent trades were placed correctly. Third trade closed at profit for about 51 pips. I had set the TP to 75 but it must not be figuring TP the way I imagined.

How does the EA set the TP.

Thanks
Snaggin' some pips
DragosDanescu
Trader
Posts: 118
Joined: Wed Nov 16, 2011 5:18 pm
Location: Oradea, Western Romania

Re: Martingale with "low" margin hit

Post by DragosDanescu »

spyderman wrote:Hey DD,

I've got the EA running and have a couple of trades open. One that closed is an Aud/Usd trade. The first two trades hit s/l and the subsequent trades were placed correctly. Third trade closed at profit for about 51 pips. I had set the TP to 75 but it must not be figuring TP the way I imagined.

How does the EA set the TP.

Thanks
LevelsOffset = 12.5, StopLevel=2 and TPLevel=6 means: SL=25 (StopLevel*LevelOffset) and TP = 75 (TPLevel*LevelOffset). Just as example...but as LevelsOffset is dinamically calculated(according to the trigger candle range), EA will do the math...anyway, you can also calculate those values according to the LevelsOffset displayed, when a trigger is "Found".
It doesn't place fixed TP, because of the ProfitTrailing option, but as soon as price is higher/lower than designated TP level, it closes positions.
OR, if OverallProfitClosure active, at any point PROFIT is bigger than NetProfit value, it will trail/close the positions, ignoring TP. And you should have that option active, as, after MaxLots is hit, it will use it to look for BE.
I have all options active on mine.

It's true that ProfitTrailing brings 1 to 5 $ more each time, but it's also true that, if you set NetProfit to 25 and, at a certain time, profit hits 25, but then price retraces back, EA won't close the position. It needs at least 25 + 5%(MaxRetrace value).
Last edited by DragosDanescu on Thu Jan 05, 2012 10:18 pm, edited 1 time in total.
Image
User avatar
spyderman
Trader
Posts: 338
Joined: Sun Dec 11, 2011 1:39 pm

Re: Martingale with "low" margin hit

Post by spyderman »

DragosDanescu wrote:
spyderman wrote:Hey DD,

I've got the EA running and have a couple of trades open. One that closed is an Aud/Usd trade. The first two trades hit s/l and the subsequent trades were placed correctly. Third trade closed at profit for about 51 pips. I had set the TP to 75 but it must not be figuring TP the way I imagined.

How does the EA set the TP.

Thanks
LevelsOffset = 12.5, StopLevel=2 and TPLevel=6 means: SL=25 (StopLevel*LevelOffset) and TP = 75 (TPLevel*LevelOffset). It doesn't place fixed TP, because of the ProfitTrailing option, but as soon as price is higher/lower than designated TP level, it closes positions.
OR, if OverallProfitClosure active, at any point PROFIT is bigger than NetProfit value, it will trail/close the positions, ignoring TP. And you should have that option active, as, after MaxLots is hit, it will use it to look for BE.
I have all options active on mine.

It's true that ProfitTrailing brings 1 to 5 $ more each time, but it's also true that, if you set NetProfit to 25 and, at a certain time, profit hits 25, but then price retraces back, EA won't close the position. It needs at least 25 + 5%(MaxRetrace value).
Thanks much. I'll try that.
Snaggin' some pips
DragosDanescu
Trader
Posts: 118
Joined: Wed Nov 16, 2011 5:18 pm
Location: Oradea, Western Romania

Re: Martingale with "low" margin hit

Post by DragosDanescu »

spyderman wrote:
DragosDanescu wrote:
spyderman wrote:Hey DD,

I've got the EA running and have a couple of trades open. One that closed is an Aud/Usd trade. The first two trades hit s/l and the subsequent trades were placed correctly. Third trade closed at profit for about 51 pips. I had set the TP to 75 but it must not be figuring TP the way I imagined.

How does the EA set the TP.

Thanks
LevelsOffset = 12.5, StopLevel=2 and TPLevel=6 means: SL=25 (StopLevel*LevelOffset) and TP = 75 (TPLevel*LevelOffset). It doesn't place fixed TP, because of the ProfitTrailing option, but as soon as price is higher/lower than designated TP level, it closes positions.
OR, if OverallProfitClosure active, at any point PROFIT is bigger than NetProfit value, it will trail/close the positions, ignoring TP. And you should have that option active, as, after MaxLots is hit, it will use it to look for BE.
I have all options active on mine.

It's true that ProfitTrailing brings 1 to 5 $ more each time, but it's also true that, if you set NetProfit to 25 and, at a certain time, profit hits 25, but then price retraces back, EA won't close the position. It needs at least 25 + 5%(MaxRetrace value).
Thanks much. I'll try that.
again...LevelsOffset = 12.5, StopLevel=2 and TPLevel=6 means: SL=25 (StopLevel*LevelOffset) and TP = 75 (TPLevel*LevelOffset). Just as example...but as LevelsOffset is dinamically calculated(according to the trigger candle range), EA will do the math...anyway, you can also calculate those values according to the LevelsOffset displayed, when a trigger is "Found".
OR, you can edit the code, replacing "0" with "take", in the SendGrid(and SendBuyGrid/SendSellGrid)/SendSingleTrade section...
Then you will have fixed TP.
Image
User avatar
spyderman
Trader
Posts: 338
Joined: Sun Dec 11, 2011 1:39 pm

Re: Martingale with "low" margin hit

Post by spyderman »

DD,

Thanks for your patience. As a non-coder I know I've been a little slow understanding your directions.
I think I'm on the right track though. :D

I opened up the code (as scary as that seems) and noticed a lot of the inputs that you mentioned (like the "stop level=2") which were not showing up on my inputs screen, were there but without the "string" designator.

So I figured if I added the "string" that they would show up and sure enough they did. :lol:

Sooooo, I think I have it set up the way I want. Just a couple of questions though.

I tried to get it to open a trade based on time. I set to true and set the time to broker time a couple of minutes in the future. It wouldn't take the trade. Any idea what I might be getting wrong? My broker time shows 02:28:xx and I set to 02:30. Meanwhile my local time is 06:44. I noticed there's an input commented out in the code that says "hours=23". Would this have anything to do with it.

In the meantime I'm setting the EA on H1 and setting "engulfing" and "IB" to true.

Thanks again for your patience.
Snaggin' some pips
User avatar
spyderman
Trader
Posts: 338
Joined: Sun Dec 11, 2011 1:39 pm

Re: Martingale with "low" margin hit

Post by spyderman »

Sigh.....
I thought I had it. Had Aud/Usd set up to buy with a levelsoffset of 12, stop level of 2 and tp of 6. Trade was opened with a stop loss of 32. Trade info shows levels offset of 16.1.

So looking at your previous comment:

DragosDanescu wrote: Just as example...but as LevelsOffset is dinamically calculated(according to the trigger candle range), EA will do the math...anyway, you can also calculate those values according to the LevelsOffset displayed, when a trigger is "Found".
OR, you can edit the code, replacing "0" with "take", in the SendGrid(and SendBuyGrid/SendSellGrid)/SendSingleTrade section...
Then you will have fixed TP.
You lost me again on this. Could not find this input in the code. If I do what does the "take" do or come from?

****Edit**** Okay I found 4 instances where I changed the "0" to "take". EA placed new order as shown below. It's setting the TP to about 125 and the s/l is still at 16.

I've also included a shot of my EA settings.
You do not have the required permissions to view the files attached to this post.
Snaggin' some pips
Post Reply

Return to “Ideas for Possible Automation”