m00nlyte / Publications
Forum
How to find the length of last trend in oscillator
Hi all, What's the best way to find the length of a trend in an oscillator? For example when macd moves below zero for 4 bars the length of the trend will be 4
Buy order not placing
bool Buy_Condition_1 = (maVal[ 0 ]>maVal[ 1 ]) && (maVal[ 1 ]>maVal[ 2 ]); // MA- 8 Increasing upwards bool Buy_Condition_3 = (adxVal[ 0 ]>Adx_Min); // Current ADX value greater than minimum value ( 22 ) bool Buy_Condition_4 = (plsDI[ 0 ]>minDI[ 0 ]); // +DI greater than -DI
Need help on errors, thanks!
//--- input parameters input int StopLoss= 30 ; input int TakeProfit= 100 ; input int ADX_Period= 8 ; input int MA_Period= 8 ; input int EA_Magic= 12345 ; // Ea majic number input double Adx_Min= 22.0 ; // Minimum ADX Value input double Lot= 0.1 ; // other
custom position sizes
Hello I am new to all of this. I have a trading strategy I am looking to automate but I need to make sure of something first. Can you code custom position sizes based on the amount you have in a trading account? Such as 1.3 % of your account size? Thanks