Simple trending - page 2

 

I'll post updated information in the first post on a daily basis.

If you get any ideas how to upgrade the system (if you think of any good entry signal, I'll add a trailing stop) post them here.

 

margin percent indicator?

On FXCM, Usable margin % is calculated by free_margin/equity. It is a percent between 0 and 100. On metatrader (through interbankfx at least) the margin level % is calculated differently. I am trying to create an indicator or something that will display the usable margin % calculated like fxcm does. I have created an indicator that will show the usable margin % on a chart but I am having trouble determining if it is updating in real-time correctly. I was wondering if my code was correct for it to keep updating the usable margin % in real time regardless of the time frame of the chart the indicator is attached to. (I've also been curious if anyone else has made something like this.)

Thanks

#property indicator_chart_window

//---- input parameters

extern int decimals=6;

extern int Text_Size=10;

extern color Text_Color=White;

extern int X_Distance=10;

extern int Y_Distance=20;

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- indicators

//----

return(0);

}

//+------------------------------------------------------------------+

//| Custom indicator deinitialization function |

//+------------------------------------------------------------------+

int deinit()

{

//----

//----

return(0);

}

//+------------------------------------------------------------------+

//| Custom indicator iteration function |

//+------------------------------------------------------------------+

int start()

{

int counted_bars=IndicatorCounted();

int iBarsToCalc = Bars - IndicatorCounted();

if (iBarsToCalc < Bars) iBarsToCalc++;

// Iterate over bars

for (int i=iBarsToCalc-1;i>=0;i--) {

double free=AccountFreeMargin()/AccountEquity()*100;

ObjectCreate("comment_label",OBJ_LABEL,0,0,0);

ObjectSet("comment_label",OBJPROP_XDISTANCE,X_Distance);

ObjectSet("comment_label",OBJPROP_YDISTANCE,Y_Distance);

string words = "Usable Margin: "+DoubleToStr(free,decimals)+"%";

ObjectSetText("comment_label",words,Text_Size,"Arial",Text_Color);

WindowRedraw();

}

//----

//----

return(0);

}

//+------------------------------------------------------------------+
 

Hi geoguy,

I moved your post to this thread as Shinigami posted some margin tool on the first post of this thread so may be usefull.

 

Margin Call Indicator/Code Needed

Does anyone have an indicator that will show your brokers Margin Call level 20% or Stop out Level 10% have a look http://www.liteforex.org/accounttypes.php

(I don't use them it's just and example)

I was thinking that if we could create some sort of indi or code that could show this it might help reduce account being blown up as I would think that most people will not know at which level they might get a margin call.

Anyway just thinking out loud.

Cheers

Beno

 

Some margin code is on the first post of this thread.

 

Everyone, you may not know this. But 6 months ago, I tried this, exactly like this, what an irony! It will burn the account, no matter what. When a consolidation or rectangle happens, it will just burn the account, no questions asked. I was looking for ways to beat the market using mechanical based systems, for too long, until I found out something that was very simple and infront of me all along.

I have already met about 5 methods, mechanically, that are exactly the same as mine was. Now, I am just getting ready until someone finds one of my old methods again, and brags that they found it, when I did first. It doesn't make me feel comfortable.

Shinigami and everyone else,

when trying to find a mechanical system, a.k.a no indicators just math-based systems, don't make it to hard on yourself. Look for something the market can't do, and make a system out of that. Put your stoplosses and takeprofits in a way the market won't go, and you will find it, the Hawaii method. Remember, always try Open Price, it might make the system better.

Peace EVERYONE!!!

 

Here is a 7-year backtest, that became a 2-year backtest because it burned the account.

40sl and 40tp. GbpUsd.

I coded this EA myself. On InterbankFX.

I'll even be nice and start with $5,000 deposit. That's a lot of money!

Tick Data

$20,000 drawdown

Files:
 

hi

Dan7974:
Here is a 7-year backtest, that became a 2-year backtest because it burned the account.

40sl and 40tp. GbpUsd.

I coded this EA myself. On InterbankFX.

I'll even be nice and start with $5,000 deposit. That's a lot of money!

Tick Data

$20,000 drawdown

is there anything wrong with that EA ?

===================

Forex Indicators Collection

 

No, nothing is wrong the the EA!

It's the system!!!!!!!!!!!

 

Margin monitor

Does anyone have a script, EA or indicator that monitors the margin levels in an account?