Monthly Archives: July, 2022

Moving Averages and Stochastic: Simple Indicators for a Simple Trading Strategy

Strategies help traders avoid common mistakes by providing a strict and understandable analysis system. By following it, you get closer to success and understanding market patterns. Here’s a simple strategy that both beginners and professionals can use. Required indicators: Short-term moving average (50-period MA)Long-term moving average (100-period MA)Classic Stochastic (14, 3, 3) Instructions Example Let’s…

Yii2: How to Create Editable Row in Gridview

Setup 1 – View Put the following code inside gridview: [ ‘class’=>’kartik\grid\EditableColumn’, ‘attribute’ => ‘nilai_tugas’, ‘value’ => function ($model) { return $model->nilai_tugas; }, ‘editableOptions’=> function ($model, $key, $index) { return [ ‘header’=>’Name’, ‘size’=>’md’, ‘formOptions’=>[‘action’ => [‘krs-detail/editNilai’]], ‘inputType’=>\kartik\editable\Editable::INPUT_TEXT, ]; } ], Setup 2 – Controller Put the following code into controller file: use kartik\grid\EditableColumnAction; use yii\helpers\ArrayHelper;…