Cost Averaging System - page 24

 

Cost Averaging RSI with Trend v3 TEST3

MagicNumber=12413

LotExponent=1.66666700

slip=3.00000000

pLots=0.10000000

TakeProfit=20.00000000

Stoploss=500.00000000

PipStep=25.00000000

MaxTrades=10

UseStopLoss=1

TotalEquityRisk=25.00000000

UseSafeMode=1

UseRSIforAddTrade=1

BuyLevel=20.00000000

SellLevel=80.00000000

SlowPeriod=9

FastPeriod=5

PriceType=5

UseTrend=1

sMAPeriod=20

MAPeriod=10

MATimeFrame=1440

MAMethod=0

MAPrice=5

UseMASlope=0

MinPips=10

MALookBack=5

UseTrailingStop=0

TrailStart=50.00000000

TrailStop=50.00000000

MM=0

RiskPercent=0.10000000

 

Cost Averaging RSI with Trend v3 TEST4

MagicNumber=12413

LotExponent=1.66666700

slip=3.00000000

pLots=0.10000000

TakeProfit=20.00000000

Stoploss=500.00000000

PipStep=25.00000000

MaxTrades=10

UseStopLoss=1

TotalEquityRisk=25.00000000

UseSafeMode=1

UseRSIforAddTrade=1

BuyLevel=20.00000000

SellLevel=80.00000000

SlowPeriod=9

FastPeriod=5

PriceType=5

UseTrend=1

sMAPeriod=20

MAPeriod=10

MATimeFrame=1440

MAMethod=0

MAPrice=5

UseMASlope=1

MinPips=10

MALookBack=5

UseTrailingStop=0

TrailStart=50.00000000

TrailStop=50.00000000

MM=0

RiskPercent=0.10000000

 

Cost Averaging RSI with Trend v3 TEST5

MagicNumber=12413

LotExponent=1.66666700

slip=3.00000000

pLots=0.10000000

TakeProfit=20.00000000

Stoploss=500.00000000

PipStep=25.00000000

MaxTrades=10

UseStopLoss=1

TotalEquityRisk=25.00000000

UseSafeMode=1

UseRSIforAddTrade=1

BuyLevel=20.00000000

SellLevel=80.00000000

SlowPeriod=9

FastPeriod=5

PriceType=5

UseTrend=1

sMAPeriod=20

MAPeriod=10

MATimeFrame=1440

MAMethod=0

MAPrice=5

UseMASlope=1

MinPips=10

MALookBack=5

UseTrailingStop=1

TrailStart=50.00000000

TrailStop=50.00000000

MM=0

RiskPercent=0.10000000

 

Cost Averaging RSI with Trend v3 TEST6

MagicNumber=12413

LotExponent=1.66666700

slip=3.00000000

pLots=0.10000000

TakeProfit=20.00000000

Stoploss=500.00000000

PipStep=25.00000000

MaxTrades=10

UseStopLoss=1

TotalEquityRisk=25.00000000

UseSafeMode=1

UseRSIforAddTrade=1

BuyLevel=20.00000000

SellLevel=80.00000000

SlowPeriod=9

FastPeriod=5

PriceType=5

UseTrend=1

sMAPeriod=20

MAPeriod=10

MATimeFrame=1440

MAMethod=0

MAPrice=5

UseMASlope=1

MinPips=10

MALookBack=5

UseTrailingStop=1

TrailStart=50.00000000

TrailStop=50.00000000

MM=1

RiskPercent=0.10000000

 

Maji,

I'm in need of a little code mentoring with my support resistance project.

Please help me get my loops and arrays working.

https://www.mql5.com/en/forum/174700/page72

 
Aaragorn:
Maji,

I'm in need of a little code mentoring with my support resistance project.

Please help me get my loops and arrays working.

https://www.mql5.com/en/forum/174700/page72

Wow... you do like complicated stuff

I could not figure out what your code was doing. What are you trying to accomplish?

 

i'm testing v3 rsi with trend with default settings on ibfx mini on a 5M chart

the ea opened a usd/chf buy trade at 1.2509. the market is now at 1.2421 and it has not opened another buy order. there are no error reports in the expert tab.

edit: it now opened a new buy order at 1.2436. i thougth it would open orders every 25 pips

 
Maji:
Wow... you do like complicated stuff I could not figure out what your code was doing. What are you trying to accomplish?

The part of the code I am struggling with is trying to loop thru two arrays and combine them into a histogram where each unique value is only represented once. The two arrays hold collected information one value is the price level and the other value is how many times that price level was matched. so it looks like this...

TotalOMatches

holds the matches for each in the Opens array

the trick is that as many times as there are matches for a specific price level there is an additional entry in each array.

What I need to accomplish is to loop thru these two arrays and pick out each level only once and append it into the OpenHistogram[level][matches] array

my code is trying to do that.

the for loop cycles each of the two arrays thru the while loop

the while loop is supposed to simply incerment the index in the two arrays when the levels match what is already in the histogram so that it doesn't duplicate entries of identical price levels in the histogram. If however it finds that the level it is examining is not already in the histogram or that the value for that level has increased then it is supposed to append the new value in the histogram index location.

the effect of this is that we end up with a histogram which holds each unique price level and it's corresponding matchs only one time. This histogram can then become a reflection of each price level and it's relative strength.

The price levels will remain unique but the match values may increase as new bars produce new matches in addition to the matches already established. the histogram needs to be a place where all this is reflected.

 

Aaragorn,

I am sorry, but I will have to say that your code has be perplexed. I can't think complicated things too much, so that is the problem. I think you are complicating a simple matter. Trading can't be that complicated. Think simple, and keep things simple.

 
Aaragorn:

the effect of this is that we end up with a histogram which holds each unique price level and it's corresponding matchs only one time. This histogram can then become a reflection of each price level and it's relative strength.

The price levels will remain unique but the match values may increase as new bars produce new matches in addition to the matches already established. the histogram needs to be a place where all this is reflected.

Does this resemble what you're trying to do at all?

https://www.mql5.com/en/forum/173721

or this?

https://www.mql5.com/en/forum/173721

I'm pretty sure they're somewhat different from what you've described, but maybe they'll give you some ideas. I hope it helps!

Reason: